Welcome Guest, Not a member yet? Register   Sign In
Noob here.. Help !!
#1

[eluser]Unknown[/eluser]
Hello guys,
I am learning CI from a tutorial from NETTUTS ...
In the second day tutorial, i have created a Controller, Model and a view...

However when i try to run the controller from my browser :

Address Bar: http://localhost/ci/index.php/site_2



Error:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in G:\xampp\htdocs\ci\application\models\data_model.php on line 5


Code :

Code:
<?php

class Site_2 extends CI_Controller{
  function index(){
   $this -> load -> model('data_model');
   $data['rows'] = $this -> data_model -> getAll();
  
   $this -> load -> view('home_2');
  }
}

?>



Any help will be appreciated.
Thank you.




Theme © iAndrew 2016 - Forum software by © MyBB