Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in E:\wamp\huike\ThinkPHP\Common\common.php on line 650
<?php
ini_set("memory_limit","12M");
//echo ini_get('display_errors');
define('APP_NAME','Index');//项目名称,非整个网站项目,此处是前台项目名称
define('APP_PATH','./Index/');//前端项目路径
define('RUNTIME_PATH','./Index/indexruntime/');//
require_once './ThinkPHP/ThinkPHP.php';
//echo C('username');
//define('APP_DEBUG',TRUE);
?>
添加
ini_set("memory_limit","12M");
本文介绍了一种常见的PHP开发问题——内存溢出错误,并提供了解决方案。通过调整PHP配置文件中的memory_limit参数,可以有效避免因内存不足导致的应用崩溃。
1037

被折叠的 条评论
为什么被折叠?



