我有以下文件:
控制器/ 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 */
项目结构: