file upload to large, $_POST/$_FILE empty so cant throw error
Hi guys,
im trying to upload files to my script and have hit an anoying problem.
if the file is bigger than what I allow in in my php.ini config, the $_POST and $_FILE comes through empty - and I cant check that there's been a post to then check the $_FILE error being to big.
How can I check that its been posted and is to big, so I can send a message to the user informing them of this?!
Thanks!
4
Contributors
5
Replies
3 Days
Discussion Span
1 Year Ago
Last Updated
6
Views
Related Article:php upload file wont work
is a PHP discussion thread by garyjohnson that has 1 reply, was last updated 8 months ago and has been tagged with the keywords: php, upload, godaddy, file.
PHP will not be able to check the file size before the file upload is executed. There is no way you can detect on the desktop's directory. File upload has to occur first, and then the script checks on the file size..
There is another way of doing this.. it is called flash dependency class.. try searching filereference class, externalReference class... that should work for what you are trying to achieved.
If you use the flash dependency, you must use this responsibly and only for the purpose of serving the file size detection function and upload function. This can throw many security holes on the desktop side.