I want to create frontend_controller extend from My_controller and then extend from CI_controller as below code
In Configure I created __autoload function for calling class name and file
function __autoload($classname) {
if (strpos($classname, 'CI_') !== 0) {
$file = APPPATH . 'libraries/' . $classname . '.php';
if (file_exists($file)) {
@include_once($file);
}
}
}
Here is for wellcome pages
class welcome extends Frontend_controler {
public function __construct(){
parent::__construct();
}
public function index()
{
$this->load->view('welcome_message');
}
}
This is Frontend_controller
<?php
class Frontend_controler extends My_controler{
public function __construct(){
parent::__construct();
}
}
?>
This is My_controller
<?php
class My_controler extends CI_Controller{
public function __construct(){
parent::__construct();
}
}
And the finally I create .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /test/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
I got only blank pages (white empty pages) when I load my website
What I am wrong with this code?
PLease help thanks advance!!!