How can the file upload size allowed by php settings be determined withing a php script?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The upload is limited by three options: upload_max_filesize, post_max_size and memory_limit. Your upload is only done if it doesn’t exeed one of them.
The ini_get() function provides you with a short hand of the limit and should be converted first. Thx to AoEmaster for this.
Source: http://www.kavoir.com/2010/02/php-get-the-file-uploading-limit-max-file-size-allowed-to-upload.html