Welcome Guest, Not a member yet? Register   Sign In
How do you customize error pages?
#1

[eluser]inktri[/eluser]
How can I load header/footer views from the view folder and place it inside the error_*.php pages located in /application/errors?

I've tried include("../views/header.php"); and load view without luck
#2

[eluser]Colin Williams[/eluser]
Try using an absolute path:

Code:
include APPPATH .'views/header.php';
#3

[eluser]inktri[/eluser]
i use the session library in header.php and therefore errors arise

is there a clean way to move custom error pages into the view folder?
#4

[eluser]Colin Williams[/eluser]
You might be able to utilize output buffering functions to be able to write headers first. You can also create a MY_Exceptions.php library and overload the methods of CI_Exceptions.php to do your own error handling.




Theme © iAndrew 2016 - Forum software by © MyBB