Exemplo n.º 1
0
 static function command($cmd, $args = null)
 {
     if ($args !== null) {
         $cmd = Sys::escapeArgument($cmd);
         $_g = 0;
         while ($_g < $args->length) {
             $a = $args[$_g];
             ++$_g;
             $cmd .= " " . _hx_string_or_null(Sys::escapeArgument($a));
             unset($a);
         }
     }
     if (Sys::systemName() === "Windows") {
         $cmd = "\"" . _hx_string_or_null($cmd) . "\"";
     }
     $result = 0;
     system($cmd, $result);
     return $result;
 }
Exemplo n.º 2
0
 static function command($cmd, $args = null)
 {
     if ($args !== null) {
         $cmd = Sys::escapeArgument($cmd);
         $_g = 0;
         while ($_g < $args->length) {
             $a = $args[$_g];
             ++$_g;
             $cmd .= " " . Sys::escapeArgument($a);
             unset($a);
         }
     }
     $result = 0;
     system($cmd, $result);
     return $result;
 }