Welcome Guest, Not a member yet? Register   Sign In
How to load view in file error_404.php?
#9

[eluser]Unknown[/eluser]
In 'application/config/routes.php' just specify the controller and function to be called on a 404.

routes.php
----------
Code:
$route['404_override'] = 'site/not_found';

Using the above example just put a function called 'not_found' in the controller 'site.php'.
Then just load the view you want as usual.

site.php
--------
Code:
public function not_found()
{
$this->load->view('error_404');
}




Messages In This Thread
How to load view in file error_404.php? - by El Forum - 08-06-2008, 07:36 AM
How to load view in file error_404.php? - by El Forum - 08-06-2008, 11:34 AM
How to load view in file error_404.php? - by El Forum - 08-06-2008, 01:51 PM
How to load view in file error_404.php? - by El Forum - 09-07-2008, 01:01 AM
How to load view in file error_404.php? - by El Forum - 10-10-2008, 03:55 AM
How to load view in file error_404.php? - by El Forum - 03-03-2009, 07:03 AM
How to load view in file error_404.php? - by El Forum - 03-03-2009, 07:08 AM
How to load view in file error_404.php? - by El Forum - 03-03-2009, 07:11 AM
How to load view in file error_404.php? - by El Forum - 07-06-2012, 07:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB