Kôd:
$arg1 = "arg1";
$arg2 = "arg2";
$page = "/path/tothe/script/scriptToRun.php";
$args = "--arg1='".urlencode($arg2)."' --arg2 ='".urlencode($arg2)."'";
$command = "(php -c /usr/local/lib/php.ini ".$page." ".$args." &) > /dev/null";
system($command);
ili
Kôd:
Since you're talking about DOS (or console window in win32), you can spawn
say "calc.exe" as: system("start calc.exe");
This will run calc.exe w/o waiting it to terminate.
In *nix you can run as: "./program.sh&" (using the "&" character to let it
run in the background).
prvi nachin je bolji jer mozes da redirektujes u fajl umesto u /dev/null i da ti to sluzi kao log.