Php 在web文件夹中安装yii2后不显示任何内容

Php 在web文件夹中安装yii2后不显示任何内容,php,ubuntu,yii2,Php,Ubuntu,Yii2,我是yii2.0的新手。安装yii2后 我试图打开locahost/yiitest/web应该是祝贺页面,但页面只显示“run();” web/index.php <?php // comment out the following two lines when deployed to production defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV',

我是yii2.0的新手。安装yii2后

我试图打开locahost/yiitest/web应该是祝贺页面,但页面只显示“run();”

web/index.php

<?php

// comment out the following two lines when deployed to production
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');

$config = require(__DIR__ . '/../config/web.php');

(new yii\web\Application($config))->run();

寻求调试帮助的问题(“为什么此代码不起作用?”)必须包括所需的行为、特定的问题或错误以及在问题本身中重现这些问题所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。请阅读并相应更新您的问题。安装后,我没有做任何事情。我只是想向大家展示一下,你用浏览器调用链接/url,例如:locahost/yiitest/web/index.php?当然不是。只有localhost/yiitest/web。我解决了这个问题。安装php或其他东西时我的错误。把它拿走。然后正确地重新安装。寻求调试帮助的问题(“为什么此代码不工作?”)必须包括所需的行为、特定的问题或错误以及在问题本身中重现它所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。请阅读并相应更新您的问题。安装后,我没有做任何事情。我只是想向大家展示一下,你用浏览器调用链接/url,例如:locahost/yiitest/web/index.php?当然不是。只有localhost/yiitest/web。我解决了这个问题。安装php或其他东西时我的错误。把它拿走。然后正确地重新安装。