From 26f3fecb17d33d8509de5f1c3ace77bb2f1d20b1 Mon Sep 17 00:00:00 2001 From: zauguin Date: Thu, 1 Nov 2012 18:43:17 +0100 Subject: [PATCH] Added support for PHP built-in Web server --- index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.php b/index.php index bed5d93..ccaf047 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,10 @@ if (!ini_get('date.timezone')) { date_default_timezone_set('UTC'); } +if(php_sapi_name() == 'cli-server' && file_exists(substr($_SERVER['REQUEST_URI'], 1))) { + return false; +} + require 'vendor/autoload.php'; $app = require 'boot.php'; $app->run(); \ No newline at end of file