【问题标题】:ERROR 403 - FORBIDDEN the server.php file in Laravel错误 403 - 禁止 Laravel 中的 server.php 文件
【发布时间】: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 网络服务器

标签: php laravel laravel-4


【解决方案1】:

检查您是否将此文件“server.php”的权限设置为755 ...

【讨论】:

  • 这有资格成为答案吗??
猜你喜欢
  • 2017-08-18
  • 2017-12-20
  • 1970-01-01
  • 2016-05-19
  • 1970-01-01
  • 1970-01-01
  • 2017-12-05
  • 1970-01-01
相关资源
最近更新 更多