$_FILES field 'tmp_name' has no value on .JPG file extension

前端 未结 7 2029
时光取名叫无心
时光取名叫无心 2020-11-29 07:53

i was making an upload script when i tested an image file wit this extension .JPG, i don\'t know whats the difference between jpg or jpeg, but it seems that $_FILES don\'t r

7条回答
  •  执笔经年
    2020-11-29 08:54

    Check your php.ini and in particular this setting

    ; Maximum allowed size for uploaded files.
    ; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
    upload_max_filesize = 6M
    

    Or do this in your Apache Config:

    
        php_value post_max_size 6M
        php_value upload_max_filesize 6M
    
    

    I would also say that it is poor that PHP doesn't report an error in the error logs if you upload a file that is larger than your php.ini upload_max_filesize setting. For example, if you upload a 6MB file when you have it set at 2M (which I think is the default).

提交回复
热议问题