Hi,
I have created a script but need some help on a particular problem.
I have an upload script that works as it should. The problem i got is if i upload a file larger than what the server allows it just seems to refresh the upload.php page with no errors.
I will be sharing the script so it will be used on different servers. I am after something that will check the max file size the server allows and check it against the file size, and if file size is greater than max file size set by server to display an error.
Can someone tell me a simple way of checking this that will work will with all or majority of servers?
I guess the matter is confused more as not sure what the file size should be checked against as i understand PHP has POST_MAX_SIZE and UPLOAD_MAX_SIZE .
Also whilst im asking this question can someone tell me if php can read a file using is_readable() does that mean because a file is readable by php it can also be deleted by php or no?
Any help much appreciated.
Thanks
Mat
Hi,
I have created a script but need some help on a particular problem.
I have an upload script that works as it should. The problem i got is if i upload a file larger than what the server allows it just seems to refresh the upload.php page with no errors.
I will be sharing the script so it will be used on different servers. I am after something that will check the max file size the server allows and check it against the file size, and if file size is greater than max file size set by server to display an error.
Can someone tell me a simple way of checking this that will work will with all or majority of servers?
I guess the matter is confused more as not sure what the file size should be checked against as i understand PHP has POST_MAX_SIZE and UPLOAD_MAX_SIZE .
Also whilst im asking this question can someone tell me if php can read a file using is_readable() does that mean because a file is readable by php it can also be deleted by php or no?
Any help much appreciated.
Thanks
Mat
|
|
Search Webmaster Help and Solution
Server Max File Size Upload ?Related ItemsQuery failed: connection to localhost:3354 failed (errno=111, msg=Connection refused). |
