10-25-2018, 06:04 PM
(This post was last modified: 10-25-2018, 06:06 PM by ppuhan1389.)
I have a my controller in application/core
<?php
class MY_Controller extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('loginModel');
$this->load->library('session');
$this->load->library('email');
.....
}
public function _show_homebasic(){
$data=array();
$data['SiteImagesURL']=$this->config->item('SiteImagesURL');
$data['SiteCustomCSSURL']=$this->config->item('SiteCustomCSSURL');
$data['SiteCustomJSURL']=$this->config->item('SiteCustomJSURL');
$data['SiteVendorURL']=$this->config->item('SiteVendorURL');
return $data;
}
}
?>
Now in application/controller directory is have
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Test extends MY_Controller {
function __construct() {
parent::__construct();
$this->load->library('session');
$this->load->library('email');
}
/*
* Function type : index
* Function desc : Shows the main Page
*/
public function index()
{
echo "hello";
}
}
?>
while running the site in linux server i am getting below error
Fatal error: Class 'MY_Controller' not found in /home/vritipgc/public_html/application/controllers/Test.php on line 5
A PHP Error was encountered
Severity: Error
Message: Class 'MY_Controller' not found
Filename: controllers/Test.php
Line Number: 5
Backtrace:
Please Help
<?php
class MY_Controller extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('loginModel');
$this->load->library('session');
$this->load->library('email');
.....
}
public function _show_homebasic(){
$data=array();
$data['SiteImagesURL']=$this->config->item('SiteImagesURL');
$data['SiteCustomCSSURL']=$this->config->item('SiteCustomCSSURL');
$data['SiteCustomJSURL']=$this->config->item('SiteCustomJSURL');
$data['SiteVendorURL']=$this->config->item('SiteVendorURL');
return $data;
}
}
?>
Now in application/controller directory is have
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Test extends MY_Controller {
function __construct() {
parent::__construct();
$this->load->library('session');
$this->load->library('email');
}
/*
* Function type : index
* Function desc : Shows the main Page
*/
public function index()
{
echo "hello";
}
}
?>
while running the site in linux server i am getting below error
Fatal error: Class 'MY_Controller' not found in /home/vritipgc/public_html/application/controllers/Test.php on line 5
A PHP Error was encountered
Severity: Error
Message: Class 'MY_Controller' not found
Filename: controllers/Test.php
Line Number: 5
Backtrace:
Please Help