// 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';
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);
}
}
--- /dev/null
+<?php
+
+if (is_file($_SERVER['DOCUMENT_ROOT'] . urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))))
+ return false;
+
+require $_SERVER['DOCUMENT_ROOT'].'/index.php';
+