2016-01-24 19:16:39 3227次浏览 2条回答 0 悬赏 10 金钱

以下是index.php内容,以前在别的电脑上没事,现在换了新电脑结果就报错

<?php
error_reporting(E_ALL);
// change the following paths if necessary
   $yii=dirname(__FILE__).'/../../../framework/yii.php';
$config=dirname(__FILE__).'/../config/main.php';

// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

require_once($yii);
Yii::createWebApplication($config)->run();

以下是报错结果:

[24-Jan-2016 19:05:05 Asia/Shanghai] PHP Fatal error:  require_once(): Failed opening required 'D:\zhizihua1\frontend\www/../../../framework/yii.php' (include_path='.;C:\php\pear') in D:\zhizihua1\frontend\www\index.php on line 12

提示路径不对,可是路径明明是对的。而且我也尝试了多种路径都不行,求大神帮助!

  • 回答于 2016-01-25 16:03 举报

    D:\zhizihua1\frontend\www/../../../framework/yii.php
    需要把yii放在表d盘下

  • 回答于 2016-01-27 10:48 举报

    这是Yii1.0版本吧,你去把framework框架放在d盘下,你看错误提示应该是路径返回到D盘之后framework文件夹找不到吧

您需要登录后才可以回答。登录 | 立即注册
a450153829
实习生

a450153829

注册时间:2015-01-26
最后登录:2016-01-24
在线时长:0小时49分
  • 粉丝0
  • 金钱0
  • 威望0
  • 积分0

热门问题