我在本地部署  服务器目录下用一个简单的测试php文件可以成功。证明不是环境的问题。但是把网站代码放进去 浏览的时候index.php(初始页面)是空白页!看网上说修改config.php 和database.php这2个文件!没接触过 确实不知道咋个修改
config.php
我把跟目录 改成本地的了 端口是8080 所以 是 
$config['base_url'] = "http://192.168.1.101:8080/";database.php我把对应的都改成了我数据库的信息了为什么还是空白页?能说下空白页的原因是什么嘛???做ASP.NET的 php的没接触过 搞得头昏脑胀。谁指点下啊!

解决方案 »

  1.   


    页面代码::<?php
    date_default_timezone_set('Asia/Shanghai');/*
    |---------------------------------------------------------------
    | PHP ERROR REPORTING LEVEL
    |---------------------------------------------------------------
    |
    | By default CI runs with error reporting set to ALL.  For security
    | reasons you are encouraged to change this when your site goes live.
    | For more info visit:  http://www.php.net/error_reporting
    |
    */
    error_reporting(4);/*
    |---------------------------------------------------------------
    | SYSTEM FOLDER NAME
    |---------------------------------------------------------------
    |
    | This variable must contain the name of your "system" folder.
    | Include the path if the folder is not in the same  directory
    | as this file.
    |
    | NO TRAILING SLASH!
    |
    */
    $system_folder = "system";/*
    |---------------------------------------------------------------
    | APPLICATION FOLDER NAME
    |---------------------------------------------------------------
    |
    | If you want this front controller to use a different "application"
    | folder then the default one you can set its name here. The folder
    | can also be renamed or relocated anywhere on your server.
    | For more info please see the user guide:
    | http://codeigniter.com/user_guide/general/managing_apps.html
    |
    |
    | NO TRAILING SLASH!
    |
    */
    $application_folder = "application";/*
    |===============================================================
    | END OF USER CONFIGURABLE SETTINGS
    |===============================================================
    */
    /*
    |---------------------------------------------------------------
    | SET THE SERVER PATH
    |---------------------------------------------------------------
    |
    | Let's attempt to determine the full-server path to the "system"
    | folder in order to reduce the possibility of path problems.
    | Note: We only attempt this if the user hasn't specified a
    | full server path.
    |
    */
    if (strpos($system_folder, '/') === FALSE)
    {
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
    $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
    }
    else
    {
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder);
    }/*
    |---------------------------------------------------------------
    | DEFINE APPLICATION CONSTANTS
    |---------------------------------------------------------------
    |
    | EXT - The file extension.  Typically ".php"
    | SELF - The name of THIS file (typically "index.php")
    | FCPATH - The full server path to THIS file
    | BASEPATH - The full server path to the "system" folder
    | APPPATH - The full server path to the "application" folder
    |
    */
    define('EXT', '.php');
    define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
    define('FCPATH', str_replace(SELF, '', __FILE__));
    define('BASEPATH', $system_folder.'/');if (is_dir($application_folder))
    {
    define('APPPATH', $application_folder.'/');
    }
    else
    {
    if ($application_folder == '')
    {
    $application_folder = 'application';
    } define('APPPATH', BASEPATH.$application_folder.'/');
    }/*
    |---------------------------------------------------------------
    | LOAD THE FRONT CONTROLLER
    |---------------------------------------------------------------
    |
    | And away we go...
    |
    */
    require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;/* End of file index.php */
    /* Location: ./index.php */
      

  2.   

    这个看手册,ci的文档很全的,而且你应该调试一下就知道了,把报错打开error_reporting(E_ALL);,还有,配置一下环境,php也可以像.NET那样调试的
      

  3.   

    初始页面配置了目录是吧????首页根据index.php 里面的配置跳转到了system\application\views里面的index.php页面显示出来了  但是引用css文件引用不了!  没有布局!而且点其他链接的时候路径跳转错误!!正确的路径应该一直在application文件夹下面但是点击链接后url跳到system这一级了!!全是Object not found!
    高手指点下