2015-11-04 128 views
0

在Laravel 4的beatnikbd.com/fb-apps/nandos-app/目錄中,有一個名爲server.php的文件。這個文件的內容是這樣的:錯誤403 - FORBIDDEN Laravel中的server.php文件

<?php 
/** 
* Laravel - A PHP Framework For Web Artisans 
* 
* @package Laravel 
* @author Taylor Otwell <[email protected]> 
*/ 

$uri = urldecode(
    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 
); 

// This file allows us to emulate Apache's "mod_rewrite" functionality from the 
// built-in PHP web server. This provides a convenient way to test a Laravel 
// application without having installed a "real" web server software here. 
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) 
{ 
    return true; 
} 

require_once __DIR__.'/public/index.php'; 

但它顯示錯誤403 - 禁止

+0

是的文件有足夠的權限? –

+0

給出的文件許可644 –

+0

看起來像該目錄中的所有內容都給出403,是否允許網絡服務器訪問它?無論如何,'server.php'在不在網絡服務器上時使用,因爲它利用了內置的PHP網絡服務器 –

回答

0

檢查,如果你設置這個文件「server.php」爲755的權限...

+0

這是否有資格成爲答案? –