环境
- Windows 7
- WAMP 服务器
- PHP 5.3.13
- Apache 2.2.12
- MySQL 5.5.24
- Laravel 4.1
我安装了 laravel,尝试运行 URL
http://localhost/laravel/public
autoload.php
define('LARAVEL_START', microtime(true));
require __DIR__.'/../vendor/autoload.php';
if (file_exists($compiled = __DIR__.'/compiled.php')){
require $compiled;
}
Illuminate\Support\ClassLoader::register();
if (is_dir($workbench = __DIR__.'/../workbench')){
Illuminate\Workbench\Starter::start($workbench);
}
我遇到了以下错误:
Warning: require(C:\wamp\www\laravel\bootstrap/../vendor/autoload.php) [function.require]: failed to open stream: No such file or directory in C:\wamp\www\laravel\bootstrap\autoload.php on line 17
和
Fatal error: require() [function.require]: Failed opening required 'C:\wamp\www\laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\laravel\bootstrap\autoload.php on line 17
最佳答案
转到当前项目文件夹
C:\wamp\www\laravelProjectFolder>
并在命令提示符中键入 composer install
并按 ENTER
键。
composer install
然后vendor
目录会被下载到laravel当前项目中。
现在刷新屏幕。
关于php - 第 17 行警告 : failed to open stream: No such file or directory in C:\wamp\www\laravel\bootstrap\autoload. php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21363829/