Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Maximum function nesting level of ‘200’ reached, aborting!
#1

[eluser]fimor[/eluser]
Hello,
I am beginner and use CI at first time.
I got a problem:
When I use this code at controller:

Code:
class Pages extends CI_Controller {

public function index()
{
  $this->load->library('template');
  $this->template->index_view();
}
}
everything works fine, but when I use:

Code:
class Pages extends CI_Controller {

public function index()
{
  $this->template->index_view();
}
}
and  $autoload['libraries'] = array('database', 'session', 'template');

I got a meggage -
Code:
Fatal error: Maximum function nesting level of '200' reached, aborting!

Help me, please!

CI 2.1.0/PHP5.3.13
#2

[eluser]CroNiX[/eluser]
A quick google of that error seems to indicate it's likely something to do with xdebug. Are you using that? Are you doing any looping in the constructs of your template library? What happens if you load the library but don't make the call to $this->template->index_view();?
#3

[eluser]fimor[/eluser]
A quick google of that error seems to indicate it’s likely something to do with xdebug. Are you using that?
- no.
Are you doing any looping in the constructs of your template library?
-no.
What happens if you load the library but don’t make the call to $this->template->index_view();?
- the same problem;

my "template"


class Template extends CI_Controller {

function index_view()
{
$CI =& get_instance();
$CI->load->view('blocks/scripts_view');
$CI->load->view('blocks/header_view');
$CI->load->view('blocks/register_view');
$CI->load->view('blocks/menu_view');
$CI->load->view('blocks/leftside_view');
$CI->load->view('blocks/rightside_view');
$CI->load->view('blocks/center_view');
$CI->load->view('blocks/footer_view');
}
}



#4

[eluser]fimor[/eluser]
CroNiX, thanks!!!!!!!!!!!!

I found an error - instead of:

class Template extends CI_Controller {

function index_view()
..........................................................

should be:
class Template{

function index_view()
...............................................................




Theme © iAndrew 2016 - Forum software by © MyBB