问题描述
当我尝试访问我的应用程序时遇到一些问题。如果我使用端口8000访问我的应用程序,例如:浏览器中的localhost:8000
,它只会返回404 Not Found和以下消息:在此服务器上找不到请求的资源。。然后,如果尝试使用localhost / nameapp访问我的应用程序,则成功返回我的应用程序的首页默认值,但CSS不能读取js。
我试图像这样在前端/网络中调试index.php:
<?php
var_dump(new yii\web\Application());
defined('YII_DEBUG') or define('YII_DEBUG',true);
defined('YII_ENV') or define('YII_ENV','dev');
require __DIR__ . '/../../vendor/autoload.php';
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
require __DIR__ . '/../../common/config/bootstrap.php';
require __DIR__ . '/../config/bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require __DIR__ . '/../../common/config/main.php',require __DIR__ . '/../../common/config/main-local.php',require __DIR__ . '/../config/main.php',require __DIR__ . '/../config/main-local.php'
);
(new yii\web\Application($config))->run();
它返回如下错误:
Fatal error: Uncaught Error: Class 'yii\web\Application' not found in C:\xampp\htdocs\nameapp\frontend\web\index.php:2 Stack trace: #0 {main} thrown in C:\xampp\htdocs\nameapp\frontend\web\index.php on line 2
如何解决这个问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)