yii 2 不工作。找不到对象。什么?

yii 2 not working. Object not found. What?

安装了 yii2 advanced 并设置了 .htaccess

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>

<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^/(admin)
RewriteRule ^admin/assets/(.*)$ backend/web/assets/ [L]
RewriteRule ^admin/css/(.*)$ backend/web/css/ [L]
RewriteRule ^admin/js/(.*)$ backend/web/js/ [L]
RewriteCond %{REQUEST_URI} !^/backend/web/(assets|js|css|js)/
RewriteCond %{REQUEST_URI} ^/(admin)
RewriteRule ^.*$ backend/web/index.php [L]
RewriteCond %{REQUEST_URI} ^/(assets|css|js|images)
RewriteRule ^assets/(.*)$ frontend/web/assets/ [L]
RewriteRule ^css/(.*)$ frontend/web/css/ [L]
RewriteRule ^js/(.*)$ frontend/web/js/ [L]
RewriteRule ^images/(.*)$ frontend/web/images/ [L]
RewriteRule ^(.*)$ frontend/web/ [L]
RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css|js)/
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ frontend/web/index.php
</IfModule>

关注 link - /frontend/web/

我得到一个错误 -

其中可能存在错误。我都按照说明做了吗?

显然它得到 404 错误。因为 frontend/web 规则是使用 .htaccess 文件重写的。

localhost中访问您的应用前端喜欢

http://localhost/your_project_directory_name/