【发布时间】:2015-11-04 09:08:51
【问题描述】:
在 Laravel 4 的 beatnikbd.com/fb-apps/nandos-app/ 目录下,有一个名为 server.php 的文件。该文件的内容如下所示:
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylorotwell@gmail.com>
*/
$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';
但它显示 ERROR 403 - FORBIDDEN
【问题讨论】:
-
文件是否有足够的权限??
-
文件权限授予 644
-
看起来该目录中的所有内容都提供 403,网络服务器是否允许访问它?无论如何,当不在网络服务器上时使用“server.php”,因为它利用了内置的 php 网络服务器