简体   繁体   中英

Problem with MAX_FILE_SIZE in PHP

I have a flex-based image upload form, and I've lost its source code. Now there appeared a problem with uploading big images (about 10MB), but with the same images an old html-based form works correctly. In my php-file there's

ini_set("post_max_size","64M");
ini_set("upload_max_filesize","64M");

Flex-based form returns file[error] = 2, that's MAX_FILE_SIZE error. It seems somewhere in flex there's an auto-generated field MAX_FILE_SIZE that it sends to server at the time it sends a file. I can't change this value in flex, so that's my question - is there a way to rewrite MAX_FILE_SIZE variable from php before php processes MAX_FILE_SIZE variable and generates error?

You can't change that values using ini_set that's probably the problem in the first place. They can be set per directory so you can try to change their value in your .htaccess file

php_value    upload_max_filesize    64M
php_value    post_max_size    64M

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM