2017-02-18 79 views
1

我知道有幾個問題已經關於Laravel的這個問題。但是,他們都沒有解決我的問題。所以在用composer正確安裝幼蟲之後,我在我的htdocs中創建了Laravel項目文件夾。當我開始我的XAMPP服務器並嘗試通過URL來訪問它像RouteFollection.php中的NotFoundHttpException行161:Laravel index.php無法訪問

http://localhost/Php/myLaravel/public/index 

我收到東西一個空白頁,有時我在下面收到此錯誤信息。

NotFoundHttpException in RouteCollection.php line 161: 
in RouteCollection.php line 161 
at RouteCollection->match(object(Request)) in Router.php line 533 
at Router->findRoute(object(Request)) in Router.php line 512 
at Router->dispatchToRoute(object(Request)) in Router.php line 498 
at Router->dispatch(object(Request)) in Kernel.php line 174 
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 30 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30 
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53 
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30 
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148 
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53 

這是新鮮的安裝,沒有任何改變。這裏是項目文件夾中的.htaccess文件

<IfModule mod_rewrite.c> 
<IfModule mod_negotiation.c> 
    Options -MultiViews 
</IfModule> 

RewriteEngine On 

# Redirect Trailing Slashes If Not A Folder... 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)/$ /$1 [L,R=301] 

# Handle Front Controller... 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule^index.php [L] 

# Handle Authorization Header 
RewriteCond %{HTTP:Authorization} . 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 
</IfModule> 

有人可以幫忙嗎?謝謝

回答

0

我弄明白了,通過改變./存儲目錄的權限是可寫的,瞧它的工作!希望它對別人有幫助!

0

安裝Laravel後,您可能需要配置一些權限。

所以給權限以下兩個目錄:

storage 

bootstrap/cache 

它爲我的作品...

我希望它幫你

相關問題