I am uploading a file whose size is approx 20MB, below is the result of print_r($_FILES);
(
[name] => 10k.csv
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)
I have also increased size of upload in php.ini to upload_max_filesize=64M Then also unable to upload file. Please suggest possible points I might be missing.
The [error] => 1
line is telling you there was an error with your upload.
The PHP "Error Messages Explained" documentation says the following...
Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini.
You need to increase the upload_max_filesize.
You can set the upload_max_filesize in PHP.INI or by adding the following to your .htaccess file.
php_value upload_max_filesize 30M
php_value post_max_size 30M
将您的post_max_size
和upload_max_filesize
都更改为64M
Make changes in php.ini as
upload_max_filesize = 64M
post_max_size = 64M
reload apache or if it is staging environment restart apache.You will sucessfully upload increased size file. Thanks zairwolf its all your credit.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.