01-18-2010, 04:41 AM
[eluser]Mithun[/eluser]
I just got that My APP_Controller is not loading ;-)
I Tried the code
and
does not fire the code inside MY_Controller's constructor
But the below combination, code without MY_Controller works
I just got that My APP_Controller is not loading ;-)
I Tried the code
Code:
class MY_Controller extends Controller {
function MY_Controller()
{
parent::Controller();
$data['user_name'] = $this->dx_auth->get_username();
$this->template->write_view('user_area','user_area', $data);
}
}
and
Code:
<?php
class Opportunities extends MY_Controller
{
function Opportunities()
{
parent::Controller();
$this->load->helper(array('url', 'form'));
$this->load->library(array('Form_validation','template', 'DX_Auth'));
}
But the below combination, code without MY_Controller works
Code:
<?php
class Opportunities extends Controller
{
function Opportunities()
{
parent::Controller();
$this->load->helper(array('url', 'form'));
$this->load->library(array('Form_validation','template', 'DX_Auth'));
$data ['user_name'] = $this->dx_auth->get_username();
$this->template->write_view('user_area','user_area', $data);
}