Uploading large .pfd files in PHP using .htaccess

asked May 9, 2012 in General by DinoGuy (2,130 points)
I want to upload large files to my website? Does anyone know a way of doing this with no problems occurring? As most web servers are configured in a way that a user can only upload a file that is up to 2MB. I have .pdf files that range between 10MB to 15 MB and I want to upload them using .htaccess. Please help

1 Answer

0 like 0 dislike
answered May 9, 2012 by RalphK (5,800 points)
Here is a simple procedure  for you to use to upload your large files using file field of the form and move_uploaded_file() function in PHP.
1) Create a .htaccess file in the root folder of web server.
2) Put the following code in side the .htaccess file and save it.
php_value upload_max_filesize 15M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
Now you can upload the file-size up-to 15MB in a simple way using file field in your html form and move_uploaded_file() function available in PHP.