Created
November 8, 2014 14:56
-
-
Save displague/20ff0fe9a851ba6fa658 to your computer and use it in GitHub Desktop.
Run puphpet with: APP_ENV=dev php -S 127.0.0.1:8000 -t web/ web/app_dev.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/web/app_dev.php b/web/app_dev.php | |
index 453b353..866c46f 100644 | |
--- a/web/app_dev.php | |
+++ b/web/app_dev.php | |
@@ -1,12 +1,18 @@ | |
<?php | |
+$filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']); | |
+if (php_sapi_name() === 'cli-server' && is_file($filename)) { | |
+ return false; | |
+} | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\Debug\Debug; | |
if (getenv('APP_ENV') !== 'dev') { | |
exit; | |
} | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
ini_set('opcache.enable', '0'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ala http://silex.sensiolabs.org/doc/web_servers.html