PHP的memory_limit限制
Php代码


Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in



Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
解释是可用内存已耗尽,这关系到PHP的memory_limit的设置问题。
这里有两种方法解决
1、修改php.ini
memory_limit = 128
这种方法需要重启服务器,很显然,此方法对虚拟机有限制。
2、通过ini_set函数修改配置选项值
ini_set ("memory_limit", "128M")ini_set ("memory_limit", "128M")
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇:没有了
- 下一篇: python内存不释放原理