Welcome Guest, Not a member yet? Register   Sign In
Non-static method Pages::view() cannot be called statically
#4

This is what my code looks like
PHP Code:
class Pages extends CI_Controller   
    public 
function view($page 'home'){
 
       if ( ! file_exists(APPPATH.'views/pages/'.$page.'.php'))
 
       {
 
           // Whoops, we don't have a page for that!
 
           show_404();
 
       }
 
 
       $data['title'] = ucfirst($page);
 
       $data['description'] = "Description";
 
       $data['keywords'] = "Keywords";
 
       $data['page'] = 'pages/'.$page;
 
       $this->load->view('templates/template'$data);
 
   }

Reply


Messages In This Thread
RE: Non-static method Pages::view() cannot be called statically - by keld - 09-01-2016, 10:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB