2015-05-15 09:56:28 8130次浏览 1条回答 0 悬赏 0 金钱

我原本用yiic webapp ../demos 建立一个在E:wamp/www/yii下的demos,用<?php echo Yii::getFrameworkPath(); ?>显示E:\wamp\www\yii\framework,但是现在我想把demos移动到wamp/www目录下面,不想用绝对路径,可是不知道怎么入手,下面是移动了demos位置,然后在http://localhost/demos查看,下面出现这样的错误,求解决方法和讲解一下!!!!!!各位大神们!!!!!

( ! ) Warning: require_once(E:\wamp\www\0512test/../framework/yii.php) [function.require-once]: failed to open stream: No such file or directory in E:\wamp\www\0512test\index.php on line 12

( ! ) Fatal error: require_once() [function.require]: Failed opening required 'E:\wamp\www\0512test/../framework/yii.php' (include_path='.;C:\php\pear') in E:\wamp\www\0512test\index.php on line 12

这是E:\wamp\www\0512test\index.php

<?php

// change the following paths if necessary
$yii=dirname(__FILE__).'/../framework/yii.php';
$config=dirname(__FILE__).'/protected/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(dirname(__FILE__).'/protected/config/constants.php');
require_once($yii);
Yii::createWebApplication($config)->run();

最佳答案

  • 性感的农民 发布于 2015-05-17 19:11 举报

    问题出在这一句:

    $yii=dirname(__FILE__).'/../framework/yii.php';
    

    按照你提供的信息,应该是:

    $yii=dirname(__FILE__).'/../yii/framework/yii.php';
    
    觉得很赞
    没有找到数据。
您需要登录后才可以回答。登录 | 立即注册
asd5230653
主管

asd5230653

注册时间:2015-05-15
最后登录:2015-07-22
在线时长:4小时32分
  • 粉丝5
  • 金钱395
  • 威望10
  • 积分535

热门问题