From d7e113be4a56fa5aac3680fb5363168f545e5bce Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 16 Feb 2015 23:48:05 +0100 Subject: Added PHP API framework --- backyard/php-api/trunk/server.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 backyard/php-api/trunk/server.php (limited to 'backyard/php-api/trunk/server.php') diff --git a/backyard/php-api/trunk/server.php b/backyard/php-api/trunk/server.php new file mode 100644 index 0000000..8f37587 --- /dev/null +++ b/backyard/php-api/trunk/server.php @@ -0,0 +1,21 @@ + + */ + +$uri = urldecode( + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) +); + +// This file allows us to emulate Apache's "mod_rewrite" functionality from the +// built-in PHP web server. This provides a convenient way to test a Laravel +// application without having installed a "real" web server software here. +if ($uri !== '/' and file_exists(__DIR__.'/public'.$uri)) +{ + return false; +} + +require_once __DIR__.'/public/index.php'; -- cgit v1.2.3