note 92413 modified in function.popen by danbrown

From: Date: Thu, 23 Jul 2009 14:01:20 +0000
Subject: note 92413 modified in function.popen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-158628@lists.php.net to get a copy of this message
If you try to execute a command under Windows the PHP script normally waits until the process has been terminated. Executing long-term processes pauses a PHP script even if you don't want to wait for the end of the process. It wasn't easy to find this beautiful example how to start a process under Windows without waiting for its termination: <?php $commandString = 'start /b c:\\programToRun.exe -attachment "c:\\temp\file1.txt"'; pclose(popen($commandString, 'r')); ?> --was-- If you try to execute a command under Windows the PHP script normally waits until the process has been terminated. Executing long-term processes pauses a PHP script even if you don't want to wait for the end of the process. It wasn't easy to find this beautiful example how to start a process under Windows without waiting for its termination: <?php $commandString = 'start /b c:\\programToRun.exe -attachment "c:\\temp\file1.txt"'; pclose(popen($commandString, 'r')); ?> According to: http://lemmingzshadow.net/6/php-scripte-im-hintergrund-ausfuhren/ http://php.net/manual/en/function.popen.php

« previous php.notes (#158628) next »