Php $ _ FILES: how can I use $ _ FILES to get the size of uploaded FILES? why can't I get the file size if it exceeds 2 MB?
It can be obtained when the value is smaller than 2 MB.
Is it related to the settings in php. ini?
Reply to discussion (solution)
Related to settings in php. ini
Maximum file upload limit: upload_max_filesize
Yes. change upload_max_filesize to 100 MB.
Change upload_max_filesize to 100 M
Beyond the size set by php. ini, not only does the $ _ FILES connection $ _ POST $ _ GET and so on all expire
Of course! You can set the file or check the error message to see why the uploaded file is invisible. we recommend that you run $ _ FILES and var_dump!
Maximum file upload limit: upload_max_filesize
Maximum file upload limit: upload_max_filesize
Set the maximum value of the uploaded file.
Check $ _ FILES ['error'] first. an error occurs if the value is not 0,
1. the file size exceeds the server limit.
2. the size of the file to be uploaded exceeds the browser limit.
3. only part of the file is uploaded.
4. the file to be uploaded is not found.
5. the temporary folder on the server is lost.
6. An error occurred while writing the file to the temporary folder.
The default value of upload_max_filesize is 2 Mb.