Yii2 高级安装抛出错误“文档根目录“/var/www/html/project/console/web"不存在.'在运行 php Yii 服务时 [英] Yii2 Advanced installation throws error 'Document root "/var/www/html/project/console/web" does not exist.' while running php Yii serve

查看:29
本文介绍了Yii2 高级安装抛出错误“文档根目录“/var/www/html/project/console/web"不存在.'在运行 php Yii 服务时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过 yii2 高级安装,它可以工作并且页面已经创建.但是为了验证安装,我使用了 PHP YII serve 命令.它抛出错误

I have tried yii2 advanced installation, it works and the pages have been created. But to verify installation I used the command PHP YII serve. it throws the error

文档根目录/var/www/html/highwaymotels/console/web"不存在.

Document root "/var/www/html/highwaymotels/console/web" does not exist.

但是当我检查高级模板 github 时,它有和我的文件夹一样.我做错了什么吗?否则这里有什么问题?

But when I check the advanced template github it has the same folder as mine. Am I doing anything wrong? else what is the issue here?

推荐答案

yii serve --docroot="frontend/web/"

yii serve --docroot="frontend/web/"

这篇关于Yii2 高级安装抛出错误“文档根目录“/var/www/html/project/console/web"不存在.'在运行 php Yii 服务时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆