【发布时间】:2019-10-30 20:53:39
【问题描述】:
我正在尝试打开我的第一个 yii 应用程序 就在我写 localhost 的时候 它给出了这个错误:
警告:require_once(C:\inetpub\wwwroot/../yii-1.1.21.733ac5/yii-1.1.21.733ac5/framework/yii.php):无法打开流:C 中没有这样的文件或目录:\inetpub\wwwroot\index.php 第 13 行
致命错误:require_once(): 无法打开所需的 'C:\inetpub\wwwroot/../yii-1.1.21.733ac5/yii-1.1.21.733ac5/framework/yii.php' (include_path='.; C:\php\pear') 在第 13 行的 C:\inetpub\wwwroot\index.php 中
yii.app 的文件我必须放在哪个位置?
这是索引中的内容:
<?php
// change the following paths if necessary
$yii=dirname(__FILE__).'C:\yii\yii-1.1.21.733ac5\yii-1.1.21.733ac5\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($yii);
Yii::createWebApplication($config)->run();
?>
【问题讨论】: