Created
October 30, 2012 09:31
-
-
Save yukikaoru/3979239 to your computer and use it in GitHub Desktop.
PHP built-in web server's routing settings for Symfony2
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
<?php | |
/** | |
* This script set in your project's web/ directory. | |
* Then, you boot built-in web server as below. | |
* | |
* php -S 0.0.0.0:50000 -t /path/to/web/ /path/to/web/router.php | |
*/ | |
if (preg_match('/^(app|app_dev|config)\.php|\.(js|css|html|gif|png|jpg)$/', $_SERVER['REQUEST_URI'])) { | |
return false; | |
} else { | |
require 'app_dev.php'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment