Set Header 404 |
I am new to out put class.
What I am trying to achieve is if category not found then will go to my custom not found page. I think it's working but not sure if I have used this correct $this->output->set_status_header('404'); PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
Hi.
The way you used the set_status_header() is perfectly fine. Another option is to use helper function show_404() which will automatically load the application/errors/error_404.php or application/views/errors/html/error_404.php template depending on your CodeIgniter version and terminate controller execution. |
Welcome Guest, Not a member yet? Register Sign In |