当前位置: 首页>前端>正文

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)

问题

返回的json数据太大导致Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes),PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)_json数据,第1张

解决方案

修改php.ini的memory_limit

修改 php.ini 中的 memory_limit 数值,默认 128M,不够用可以改成 256M 或 512M

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes),PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)_微信公众号_02,第2张

宝塔中修改

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes),PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)_微信公众号_03,第3张

点击“服务”>重启或重载配置即可。

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes),PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)_php_04,第4张

再次查看

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes),PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)_微信公众号_05,第5张

不需要的字段不返回

如果这篇文章对你有用,可以关注本人微信公众号获取更多ヽ(^ω^)ノ ~

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes),PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)_php_06,第6张




https://www.xamrdz.com/web/2xn1925092.html

相关文章: