php 上传文件|图片 时候报错 Allowed memory size of 20971520
2012-10-31 09:30
549 查看
报错信息:“Allowed memory size of 20971520 bytes exhausted (tried to allocate 2048 bytes)”
网上很多的解决方案是:
修改php.ini 文件 把memory_limit的值改大,然后重启服务器,
还有的说是在页面加上ini_set(memory_limit, '20M');
我把上面的方法都测试过了,都无效,最终解决方法是下面的这代码:
ini_set(memory_limit, -1);
网上很多的解决方案是:
修改php.ini 文件 把memory_limit的值改大,然后重启服务器,
还有的说是在页面加上ini_set(memory_limit, '20M');
我把上面的方法都测试过了,都无效,最终解决方法是下面的这代码:
ini_set(memory_limit, -1);
相关文章推荐
- php 上传文件|图片 时候报错 Allowed memory size of 20971520
- PHP 上传文件 Allowed memory size of 134217728 bytes exhausted
- 执行php程序的时候,报错Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes)
- PHP Fatal Error: Allowed memory size of 262144 bytes exhausted
- PHP错误:Allowed memory size of xxx bytes(二)
- PHP错误——Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes)
- PHPExcel 报 Allowed memory size of 8388608 byte
- PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
- php.ini的memory_limit设置以及Fatal error: Allowed memory size of 134217728 bytes exhausted
- 解决PHP之 Allowed memory size of xxx bytes exhausted
- php项目编写过程中Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3214636 byt
- PHP: Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted
- 解决php服务器软件内存耗尽Allowed memory size of 123456789 bytes exhausted方法
- php的Allowed memory size of 134217728 bytes exhausted问题
- php内存溢出,出现Allowed memory size of 8388608 bytes exhausted错误的解决办法
- PHP错误Allowed memory size of 67108864 bytes exhausted的3种解决办法
- magento PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate xxxxx)
- Php Fatal error: Allowed memory size of 33554432 bytes exhausted 的解决办法
- 修改 PHP 消耗内存的方法(Allowed memory size of 8388608 bytes exhausted解决方法)
- php内存不够用,出现Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)