0

我继承了一个正在进行的 CI v2.0.2 项目。

我尝试加载默认控制器 -http://localhost/ci202/index.php但我得到的只是一个空白页面。

我为所有消息启用了日志记录,这是日志:

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>

DEBUG - 2012-10-05 23:55:41 --> Config Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Hooks Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Utf8 Class Initialized
DEBUG - 2012-10-05 23:55:41 --> UTF-8 Support Enabled
DEBUG - 2012-10-05 23:55:41 --> URI Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Router Class Initialized
DEBUG - 2012-10-05 23:55:41 --> No URI present. Default controller set.
DEBUG - 2012-10-05 23:55:41 --> Output Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Security Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Input Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Global POST and COOKIE data sanitized
DEBUG - 2012-10-05 23:55:41 --> Language Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Loader Class Initialized
DEBUG - 2012-10-05 23:55:41 --> Helper loaded: url_helper
DEBUG - 2012-10-05 23:55:41 --> Database Driver Class Initialized

为了得到这个日志,我只重新加载index.php了一次。

routes.php&的内容与.htaccessCI v2.0.2的默认安装相同。

我尝试创建另一个“helloworld”类型的控制器,它是welcome 控制器的复制品,但仍然得到一个空白页。

我还应该在哪里寻找错误配置?

4

1 回答 1

2

这可以帮助您找到问题所在。

  1. 确保数据库连接成功

  2. 如果您从 CI 配置文件启用了输出压缩,请从以下位置禁用它config.php

    $config['compress_output'] = FALSE;

  3. 从 development` 更改默认环境设置index.php to ,这样您就可以看到应用程序中可能出现的任何错误:

    define('ENVIRONMENT', 'development');

于 2012-10-06T16:27:39.500 回答