Many or most of the guys feel difficult while handling file and at the same time , many developers find difficulties when working with larger files upload in php. Depending upon the web hosting company and package you choose and for security reasons , default upload size will be 2 MB. If you are uploading the file greater than 2 MB . You can solve this difficulty of uploading the maximum file size by
1) .htaccess
2) php.ini
3) httpd.conf
And i prefer the third one because you may not have privilage to edit the php.ini and httpd.conf file in server , no problem if you are working in localhost. Ok , How to inscrease the maximum file upload size in php using .htaccess , here is the solution.
1. Create the .htaccess file
2. Put the following code in the .htaccess file
php_value upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 150
php_value max_input_time 150
You can upload up to 10MB file.
Short Description of the rule
Rule 1: upload_max_filesize sets maximum file size for uploading.
Rule 2: post_max_size sets maximum size of the post data.
Rule 3: max_execution_time sets maximum time in seconds a script is allowed to run before it is terminated.
Rule 4: max_input_time sets maximum time in seconds a script is allowed to parse input data of HTML form.
Similar Queries:
Programming Facts
Inscreasing the file upload size in wordpress
Expert Developer