$value) $args .= " --arg:".$key."=".$value; $str = exec($path."/dimctrl --exec ".$args, $out, $rc); */ // Label if (isset($_GET['label'])) { if ($_GET['label']>=0) $args .= ":".$_GET['label']; unset($_GET['label']); } // Arguments foreach ($_GET as $key => $value) $args .= ' --arg:"'.$key.'='.$value.'"'; // $args = "filename":label --arg:"key1=value" --arg:"key2=value" $cmd = $path.'/dimctrl --user "'.$_SERVER['PHP_AUTH_USER'].'" --start '.$args; // Execute $str = exec($cmd, $out, $rc); } if ($rc!=1 && $rc!=2) return header('HTTP/1.0 500 Execution failed [rc='.$rc."]"); print($rc); if (isset($_GET['debug'])) { print("\n"); print_r($out); } ?>