php.ini and .htaccess code for handling uploading big size image or file in php page
<form name=”form1″ method=”post” action=”<?php $_SERVER['PHP_SELF']; ?>” enctype=”multipart/form-data” onSubmit=”return jayjava1();”>
<input type=”hidden” name=”MAX_FILE_SIZE” value=”5000000″ /> <!–500kb(=500 * 1000)–>
<td>Please UPLOAD image:</td>
<td><input type=”file” name=”image”></td>
</form>
There are 2 ways
WAY1 (not good) :
-> go to php.ini file and
a.upload_max_filesize = 2M
change as your need 32M etc..
WAY2 (good) :
->make a file by name
.htaccess
and content of this .htaccess file=
rewriteEngine on
#set max upload file size
php_value upload_max_filesize 20M
#set max post size
php_value post_max_size 20M
#set max time script can take
php_value max_execution_time 200
#set max time for input to be recieved
php_value max_input_time 200