开发者

PHP upload MAX_FILE_SIZE error 2

开发者 https://www.devze.com 2023-02-07 21:49 出处:网络
I am trying to use Zend file transfer to upload a file in php.ini I set: upload_max_filesize = 20M post_max_size = 20M

I am trying to use Zend file transfer to upload a file

in php.ini I set:

upload_max_filesize = 20M

post_max_size = 20M

when I try to upload a 1MB file I get error 2 complaining about max_file_size

I tried setting MAX_FILE_SIZE in html as well

<input type="hidden" name="MAX_FILE_SIZE" value="2097152000000" />

but nothing is working

PHP Variables of the Upload request:

_REQUEST["MAX_FILE_SIZE"]  2097152000000

_REQUEST["PHPSESSID"]   b866b7105cb4747497f8744f56a807a0

_POST["MAX_FILE_SIZE"]  2097152000000

_FILES["userfile"]  

Array
(
    [name] => 1mpImage.jpg
    [type] => 
    [tmp_name] => 
 开发者_JAVA百科   [error] => 2
    [size] => 
)

any idea?


This question comes up now and again and usually the answer is:

In order for the ini changes to become active your apache server would need to be restarted.

If your on windows then run

apache -k restart

alternatively you can just open up services.msc > find apache web server nad right click restart.


Don't use that input:

<input type="hidden" name="MAX_FILE_SIZE" value="2097152000000" />

And you should have

<input type="file" value="">

Value="" that's the point

0

精彩评论

暂无评论...
验证码 换一张
取 消