Skip to content

Instantly share code, notes, and snippets.

@displague
Created November 8, 2014 14:56
Show Gist options
  • Save displague/20ff0fe9a851ba6fa658 to your computer and use it in GitHub Desktop.
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
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');
@displague
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment