Hi Friend’s I trust you are doing great, Today I am thought of one more cool .htaccess trick that is How to Restrict File Upload Size in PHP,Set Maximum Size of Post Data, Set Max Script Execution Time, Using this .htaccess hack you don’t have to change in php.ini file or any server config document, You just need to include taking after lines in your .htaccess records.
Restrict File Upload Size in PHP
.htaccess allows you to set file upload values that directly affect your PHP applications. For instance, if you want to impose upload limits in PHP, so that you can prevent your hosting form garbage files. just add below line in your .htaccess file.
php_value upload_max_filesize 20M
Set Maximum Size of Post Data
You can also restrict the maximum post size for uploading files in PHP, doing this add below line in your .htaccess file.
php_value post_max_size 10M
Set Maximum Script Execution Time
If you don’t want scripts to execute forever, you can limit their execution time with the help of the following line.
php_value max_execution_time 250