[eluser]samitrimal[/eluser]
hi I am new in codeigniter. when i tried to create a library it shows error. heres my code
application/libraries/Someclass.php
Code:
class Someclass {
function Something(){
echo 'hello';
}
}
application/controllers/MainController.php
Code:
class MainController extends Controller{
function MainController(){
parent::Controller();
}
function index(){
$this->load->library('Someclass');
$this->Somclass->Something();
}
}
It shows the following error
Fatal error: Call to a member function Something() on a non-object in I:\xampp\htdocs\examcontroller\system\application\controllers\MainController.php on line 14