Skip to content

Instantly share code, notes, and snippets.

@michalpipa
Created December 21, 2011 21:36
Show Gist options
  • Save michalpipa/1507820 to your computer and use it in GitHub Desktop.
Save michalpipa/1507820 to your computer and use it in GitHub Desktop.
Symfony2 router for PHP 5.4 build-in web server
<?php
if (isset($_SERVER['SCRIPT_FILENAME'])) {
return false;
} else {
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT']
. DIRECTORY_SEPARATOR
. 'app.php'
;
require 'app.php';
}
@lolautruche
Copy link

Nice ! This would be a really nice addition to Symfony indeed

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