超出了Codeigniter内存限制

时间:2014-12-04 10:20:52

标签: php codeigniter

我有以下文件:

控制器/ funding.php

<?php
/**
 * Created by PhpStorm.
 * User: ad1cjhx
 * Date: 04/12/2014
 * Time: 09:45
 */

class Funding extends CI_Controller {

    public function __construct() {

        parent::__construct();
        $this->load->model('funding');

    }

    public function index() {

        //$funding_list = $this->funding->get_all();

        $this->load->view('header');
        $this->load->view('funding/list');
        $this->load->view('footer');

    }

} 

模型/ funding.php

<?php
/**
 * Created by PhpStorm.
 * User: ad1cjhx
 * Date: 04/12/2014
 * Time: 09:53
 */

class Funding_model extends CI_Model{

    function __construct() {

        parent::__construct();

    }

    public function get_all() {

        //$sql = "SELECT * FROM funds LIMIT 1";

        return 1;

    }

} 

返回:致命错误:第1122行/webusers/u/public_html/funding_manager/application/config/autoload.php中允许的内存大小为67108864字节(尝试分配523800字节)

在控制器的构造函数中调用模型似乎会产生错误......有什么想法吗?

修改

autoload.php代码1122:

/*
| -------------------------------------------------------------------
|  Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
|   $autoload['model'] = array('model1', 'model2');
|
*/

$autoload['model'] = array();


/* End of file autoload.php */
/* Location: ./application/config/autoload.php */

项目结构:

enter image description here

0 个答案:

没有答案
相关问题