Possible Duplicate:
overriding upload_max_filesize
i use these code for change upload file size :-
echo ini_get('upload_max_filesize').'<br/>';
ini_set("upload_max_filesize","300M");
echo ini_get("upload_max_filesize");
BUT I GOT
2M
2M
which is set in php.ini.
i want to change file upload size limit.
PHP documentation says:
So you can't use
ini_set
for this.You need to increase
post_max_size
as well.You may also need to increase
memory_limit
As others have pointed out,
upload_max_filesize
cannot be changed at runtime (usingini_set
). However, once you have changed it correctly you will still need to increase these values.