Итак, после поиска в stackoverflow, решите написать этот вопрос.Пустая страница Codeignign при загрузке базы данных
Я работаю на этот раз на Годади, где находится план cPanel. Загрузил чистый пакет Codeigniter V 2.2.6, и приветственное сообщение показывает, как должно. Я сконфигурировал config.php с url и database.php с правильными данными соединения. До сих пор все работает так, как должно. Итак, после этого загрузите базу данных, чтобы увидеть, все ли происходит, и появляется «пустой экран мертвых», если я обновляю страницу.
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
$this->load->database();
$this->load->view('welcome_message');
}
}
/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */
Таким образом, после поиска, где он сломается, я обнаружил внутри /system/core/Codeigniter.php в строках 300. Разрыв до $ CI = новый $ класса();
/*
* ------------------------------------------------------
* Instantiate the requested controller
* ------------------------------------------------------
*/
// Mark a start point so we can benchmark the controller
$BM->mark('controller_execution_time_('.$class.'/'.$method.')_start');
$CI = new $class();
и внутри лог-файлов, возвращаются эти строки
DEBUG - 2015-11-19 20:57:31 --> Config Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Hooks Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Utf8 Class Initialized
DEBUG - 2015-11-19 20:57:31 --> UTF-8 Support Enabled
DEBUG - 2015-11-19 20:57:31 --> URI Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Router Class Initialized
DEBUG - 2015-11-19 20:57:31 --> No URI present. Default controller set.
DEBUG - 2015-11-19 20:57:31 --> Output Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Security Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Input Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Global POST and COOKIE data sanitized
DEBUG - 2015-11-19 20:57:31 --> Language Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Loader Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Helper loaded: url_helper
DEBUG - 2015-11-19 20:57:31 --> Helper loaded: html_helper
DEBUG - 2015-11-19 20:57:31 --> Helper loaded: cms_helper
DEBUG - 2015-11-19 20:57:31 --> Helper loaded: drops_helper
DEBUG - 2015-11-19 20:57:31 --> Controller Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Model Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Model Class Initialized
DEBUG - 2015-11-19 20:57:31 --> Helper loaded: form_helper
DEBUG - 2015-11-19 20:57:31 --> Database Driver Class Initialized
мне нужно развернуть веб сделанный в другом сервере, и когда я загружал в Godaddy появляется пустая страница, это причина, почему я загрузить чистый пакет Codeigniter. Кто-нибудь может мне помочь? Спасибо заранее.
EDIT Забыла написать отчет об ошибке на index.php базы данных библиотеки
define('ENVIRONMENT', 'development');
if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
ini_set('display_errors',1);
error_reporting(E_ALL);
break;
case 'testing':
case 'production':
error_reporting(0);
break;
default:
exit('The application environment is not set correctly.');
}
}
Добавьте 'ini_set ('display_errors', 1); error_reporting (E_ALL); 'вверху страницы, чтобы увидеть ошибки PHP. Это не поможет, но это даст вам лучшее понимание. Удалите эти строки, если вы только получаете ошибки о уже отправленных заголовках. – x13
Извините, что не указывайте это, но он находится внутри index.php. Спасибо за ваш ответ. –