Apply for Zend Framework Certification Training

Codeigniter




  How to setup a 404 page in CodeIgniter website
----------------------------------------------------------------
Step 1 
        $route['404_override'] = 'page404';    //page404 is class name. 

Step 2
        Create a new controller

<?php 
class page404 extends CI_Controller 
{
    public function __construct() 
    {
        parent::__construct(); 
    } 

    public function index() 
    { 
        $this->output->set_status_header('404'); 
        $data['content'] = 'error_404'; 
        $this->load->view('index',$data);
    } 
} 
?>                                     

< Create Dynamic menu Using Php Mysql Last >



Ask a question



  • Question:
    {{questionlistdata.blog_question_description}}
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question


Back to Top