From: Andrey Kutejko Date: Mon, 12 Jan 2015 05:49:52 +0000 (+0200) Subject: extract debug router X-Git-Tag: 0.6~70 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=e2d0d7e5c5be91fc05670f2027084e2f6fec36a7;p=ipf.git extract debug router --- diff --git a/index.php b/index.php index 9753a24..a3b8e3a 100644 --- a/index.php +++ b/index.php @@ -2,9 +2,6 @@ // This is a index stub for a IPF Projects -if (php_sapi_name() === 'cli-server' && is_file($_SERVER['DOCUMENT_ROOT'] . urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)))) - return false; - $here = dirname(__FILE__); $project_root = $here . '/..'; require_once $project_root . '/vendor/autoload.php'; diff --git a/ipf/command/debugserver.php b/ipf/command/debugserver.php index 07bc79e..2d3c103 100644 --- a/ipf/command/debugserver.php +++ b/ipf/command/debugserver.php @@ -8,7 +8,8 @@ class IPF_Command_DebugServer public function run($args=null) { $root = IPF::get('document_root'); - IPF_Shell::call('php', '-S', '0.0.0.0:8000', '-t', $root, $root . '/index.php'); + $router = dirname(__FILE__).'/../debug_router.php'; + IPF_Shell::call('php', '-S', '0.0.0.0:8000', '-t', $root, $router); } } diff --git a/ipf/debug_router.php b/ipf/debug_router.php new file mode 100644 index 0000000..1933a85 --- /dev/null +++ b/ipf/debug_router.php @@ -0,0 +1,7 @@ +