我已经在windows 8.1上使用composer成功安装了Yii2。我正在使用Xampp服务器,但我无法成功运行我的项目。
我得到这个错误:
Warning: require(C:'xampp'htdocs'application'web/../vendor/autoload.php): failed to open stream: No such file or directory in C:'xampp'htdocs'application'web'index.php on line 7
Fatal error: require(): Failed opening required 'C:'xampp'htdocs'application'web/../vendor/autoload.php' (include_path='.;C:'xampp'php'PEAR') in C:'xampp'htdocs'application'web'index.php on line 7
我还授予了适当的权限并设置了cookie验证密钥,但什么都不起作用。
谢谢你的帮助。
错误是可以自行解释的。vendor
文件夹中没有autoload.php
文件。它是在安装完所有vendor
软件包后生成的。
使用composer install
命令安装所有程序包。