I'm using CI 3 in my last project on my localhost, then I uploaded it into a server. When I tried to load the web it's always show the blank page.
I have tried configure .htaccess, config.php, database.php, route.php it seems there shouldn't have any error, then I check index.php and tried to show some text.
I tried to insert :
echo "test"; die();
for every statement in index.php, at the first it show the "test" but it disappear after switch function for environment :
switch (ENVIRONMENT)
{
case 'development':
error_reporting(-1);
ini_set('display_errors', 1);
break;
case 'testing':
case 'production':
ini_set('display_errors', 0);
if (version_compare(PHP_VERSION, '5.3', '>='))
{
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
}
else
{
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
}
break;
default:
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'The application environment is not set correctly.';
exit(1); // EXIT_ERROR
}
in case 'development'
it's still show the 'test' string but when after break in this case, the 'test' string disappear.
Can anybody fix this?
Update!!
I have finally get the answer.
Actually when it routed into my default controller (maybe it's my fault or what I didn't remember it) there's exit;
in construct function so it's never load any view.
Sorry for my less awareness
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.