Welcome Guest, Not a member yet? Register   Sign In
Why $this->load->view() call the controller many times ??!!!
#4

[eluser]cmpsca[/eluser]
yeah missing resources are 404 but my custom 404 page also increment the view by one. But yes you're right about the 404 must affect the image only. The incrementation is done in the controller file:

class test extends CI_controller{
...
$this->test_model->increment();

$this->load->view('testView');
....
}

testView.php:
<img src="images/notFound.jpg" alt="not found">
etc..


The page displays correctly except for the image which is not found. But why the code for the page not found is executed when it reaches a broken reference. I didn't know that this could be a problem. But now I know Smile


Messages In This Thread
Why $this->load->view() call the controller many times ??!!! - by El Forum - 01-17-2014, 07:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB