Increase upload maximum file size limit with this method :
Method # 1: Edit php.ini
Edit your php.ini file (usually stored in /etc/php.ini or /etc/php.d/cgi/php.ini or /usr/local/etc/php.ini):
# vi /etc/php.ini
Sample outputs:
memory_limit = 32M
upload_max_filesize = 10M
post_max_size = 20M
Save and close the file. Restart apache or lighttpd web server:
Method #2: Edit .htaccess
Edit .htaccess file in your root directory. This is useful when you do not have access to php.ini file. In this example, /home/httpd/html is considered as root directory (you can also create .htaccess file locally and than upload it using ftp / sftp / scp client):
# vi /home/httpd/html/.htaccess
Append / modify setting as follows:
php_value upload_max_filesize 10M
php_value post_max_size 20M
php_value memory_limit 32M
Save and close the file.
Method #3: Edit PHP File
ini_set('upload_max_filesize', '10M');
ini_set('post_max_size', '10M');
ini_set('max_input_time', 300);
ini_set('max_execution_time', 300);
After this you can ckeck :
<?php
phpinfo();
?>
Không có nhận xét nào:
Đăng nhận xét