鍍金池/ 問答/PHP/ laravel訪問本地項(xiàng)目報(bào)錯(cuò)是怎么回事?

laravel訪問本地項(xiàng)目報(bào)錯(cuò)是怎么回事?

我這樣訪問的localhost/monday-shop-master/public 然后報(bào)了一個(gè)這個(gè)錯(cuò)誤 加上index.php也不行

Warning: require(D:\wamp64\www\monday-shop-master\public/../vendor/autoload.php): 
failed to open stream: No such file or directory in 
D:\wamp64\www\monday-shop-master\public\index.php on line 24

Fatal error: require(): Failed opening required 
'D:\wamp64\www\monday-shop-master\public/../vendor/autoload.php' 
(include_path='.;C:\php\pear') in D:\wamp64\www\monday-shop-master\public\index.php on line 24

圖片描述

回答
編輯回答
下墜

正如樓上所說,沒有安裝依賴,另外,你應(yīng)該弄個(gè)虛擬主機(jī)來訪問,譬如

server {
    listen 80;
    server_name example.com;
    index index.php;
    error_log /path/to/example.error.log;
    access_log /path/to/example.access.log;
    root D:\wamp64\www\monday-shop-master\public;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ \.php {
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        fastcgi_index index.php;
        fastcgi_pass 127.0.0.1:9000;
    }
}

PS:一個(gè)好看的WNMP

2017年1月25日 18:16
編輯回答
淚染裳

沒有執(zhí)行composer install,建議看一下 laravel 和 composer 相關(guān)文檔。

2017年6月5日 06:55