Skip to content
Snippets Groups Projects
Commit 18100f7c authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update PHP example

parent ea03a256
Branches
No related tags found
No related merge requests found
<?php <?php
$AMCLI=__DIR__.'/../built_packages/amcli'; $AMCLI = __DIR__ . '/../built_packages/amcli';
$INI=__DIR__.'/../src/simple.ini'; $INI = __DIR__ . '/../src/simple.ini';
$sCommand="$AMCLI --ini='$INI'"; $sCommand = "$AMCLI --ini='$INI'";
$aOut=[]; $aOut = [];
exec($sCommand, $aOut, $iRc); exec($sCommand, $aOut, $iRc);
if($iRc==0){ if ($iRc == 0) {
header('Content-type: application/json'); header('Content-type: application/json');
}else{ } else {
echo "Error: occured...\n"; header("HTTP/1.1 503 Service unavailable");
echo "<h1>503 Service unavailable</h1>\n";
} }
echo implode("\n", $aOut); echo implode("\n", $aOut);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment