[eluser]life_time_learner[/eluser]
Hi, I have just begun learning CodeIgniter. And everything runs fine for me in localhost environment. Then when I moved the code to the server environment, and the view pages could not be displayed anymore. It happed to few hosts such as Godaddy, BlueGenesis and so on. I have noticed for some strange reasons I could not include the absolute path
if ( ! include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT))
{
show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
}
, any codes beyond this part could not be executed unless the file contains only simple HTML code like
<p>Hi</p>
instead of
<?php
class Blog extends Controller()
{
function Blog()
{
parent::Controller();
}
function index()
{
//$this->load->view('show.html');
echo "I could not run this ";
}
}
?>
I have used is_dir() and file_exists to check the file path, it froze (displayed blank
page)
ext
$file_path = APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT;
if(file_exists($file_path))
echo "This file exists"
else
echo "This file does not exist";
Anyone knows why?
Thank you for your kindly response in advance.