php cli server uses its own request thing

This commit is contained in:
Shish
2015-08-01 15:24:58 +01:00
parent 53f19120d2
commit ab4c558126
5 changed files with 18 additions and 8 deletions

View File

@ -437,7 +437,7 @@ function modify_url($url, $changes) {
unset($changes['q']);
}
else {
$base = $_GET['q'];
$base = _get_query();
}
if(isset($params['q'])) {
@ -1723,6 +1723,16 @@ function _get_user() {
return $user;
}
function _get_query() {
if(php_sapi_name() == 'cli-server') {
return $_SERVER["REQUEST_URI"];
}
else {
return @$_POST["q"]?:@$_GET["q"];
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Code coverage *