This is a discussion on Executing external program without getting output within the PHP Language forums, part of the PHP Programming Forums category; Is it possible to execute programs in a PHP script without waiting for the output and successfully ending the PHP ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 28 Sep, 22:36, qwerty...@googlemail.com wrote:
> Is it possible to execute programs in a PHP script without waiting for > the output and successfully ending the PHP script without ending the > external program too? Do this: Create a program that executes the program you want to execute. Use PHP to execute the first program. The first program will execute the second one and close itself. The second one will keep running, but PHP won't know ;) and PHP ignores that fact and so it finishes and the second program will still be running :). |
|
|||
|
qwertycat@googlemail.com wrote:
> Is it possible to execute programs in a PHP script without waiting for > the output and successfully ending the PHP script without ending the > external program too? > Let me guess. If you are not interested in the results, you do not need them right away. Then your program probably does not have to start right away either. This situation is ideal for a CRON job. CRON jobs are often used on web servers for clean-up routines, sending reminder e-mails, etc. |