Replace fixed path with absolute path in docroot variable

This commit is contained in:
bergware
2016-10-24 09:30:54 +02:00
parent b7aed12d4f
commit 16dab2eafc
25 changed files with 147 additions and 85 deletions

View File

@@ -12,7 +12,9 @@
*/
?>
<?
$notify = "/usr/local/emhttp/webGui/scripts/notify";
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
$notify = "$docroot/webGui/scripts/notify";
switch ($_POST['cmd']) {
case 'init':
shell_exec("$notify init");
@@ -45,7 +47,7 @@ case 'get':
echo shell_exec("$notify get");
break;
case 'archive':
shell_exec("$notify archive '{$_POST['file']}'");
shell_exec("$notify archive \"{$_POST['file']}\"");
break;
}
?>