Quote:
Non avendo accesso fisico alla macchina perņ č materialmente impossibile fare quello che dici tu.
|
Usando "exec" si puņ fare, dalla documentazione:
Quote:
Note: If a program is started with this function, in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends.
|
Codice PHP:
exec("cd /percorso/del/file/php && php file.php parametro1 parametro2 > /dev/null 2>&1 &");
> /dev/null 2>&1 redireziona lo stdout e lo stderr
& manda il programma in background
Puoi accedere ai parametri passati da linea di comando con $argv, $argv[1] č il primo parametro, $argv[2] il secondo, ecc