Update script path in shell_exec command
Changed the script path in the shell_exec command to include a forward slash before 'script.php' for correct execution.
This commit is contained in:
parent
8af61f97b0
commit
f3513ea80e
@ -4,7 +4,7 @@ if($_SERVER["REQUEST_URI"] == '/metrics') {
|
|||||||
header('Content-Type: text/plain; version=0.0.4');
|
header('Content-Type: text/plain; version=0.0.4');
|
||||||
$config = getenv('CONFIG_FILE');
|
$config = getenv('CONFIG_FILE');
|
||||||
$phpbin = getenv('PHP_BINARY');
|
$phpbin = getenv('PHP_BINARY');
|
||||||
$output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . 'script.php');
|
$output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . '/script.php');
|
||||||
echo $output;
|
echo $output;
|
||||||
} elseif ($_SERVER["REQUEST_URI"] == '/config') {
|
} elseif ($_SERVER["REQUEST_URI"] == '/config') {
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
Loading…
Reference in New Issue
Block a user