From b93464db656fe017fe434b0fc917921ded88a12c Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 31 Oct 2006 00:36:32 +0000 Subject: --- system/codeigniter/CodeIgniter.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'system/codeigniter/CodeIgniter.php') diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php index 5b3f54ae3..3e2b99dea 100644 --- a/system/codeigniter/CodeIgniter.php +++ b/system/codeigniter/CodeIgniter.php @@ -125,9 +125,16 @@ else require(BASEPATH.'codeigniter/Base5'.EXT); } +// Load the base controller class load_class('Controller', FALSE); -require(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT); +// Load the local application controller +// Note: The Router class automatically validates the controller path. If this include fails it +// means that the default controller in the Routes.php file is not resolving to something valid. +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.'); +} // Set a mark point for benchmarking $BM->mark('loading_time_base_classes_end'); -- cgit v1.2.3-24-g4f1b