Wednesday, May 7, 2008

Changing Max upload file size in php

We can change the maximum file size of uploading in 2 ways.

1) using ini_set()
if you want to set it to 8 MB try: ini_set('max_upload_filesize', 8388608);
and not : ini_set('max_upload_filesize', 8M);

2) or using .htaccess file
in .htaccess file put this line:
php_value upload_max_filesize 8M
php_value post_max_size 8M

No comments: