Skip to content

Instantly share code, notes, and snippets.

@lyoshenka
Forked from michalpipa/router.php
Created February 22, 2014 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lyoshenka/9161785 to your computer and use it in GitHub Desktop.
Save lyoshenka/9161785 to your computer and use it in GitHub Desktop.
Router script to make Symfony2 work with the PHP built-in server
<?php
if (isset($_SERVER['SCRIPT_FILENAME'])) {
return false;
} else {
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT']
. DIRECTORY_SEPARATOR
. 'app.php'
;
require 'app.php';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment