当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Codeigniter memory limit exceeded

问题描述:

I have the following file:

controllers/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');

}

}

models/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;

}

}

Which return: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 523800 bytes) in /webusers/u/public_html/funding_manager/application/config/autoload.php on line 1122

The calling of the model in the constructor of the controller seems to generate an error... Any thoughts?

EDIT

Code around 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 */

Project structure:

分享给朋友:
您可能感兴趣的文章:
随机阅读: