return from exec before finished in windows

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tores
Forum Contributor
Posts: 120
Joined: Fri Jun 18, 2004 3:04 am

return from exec before finished in windows

Post by tores »

Hi

How can I return from a exec() call in windows before the executed program is finished.

The Code:

Code: Select all

exec(PHP_PATH.'php sql\\dobackup.php TICKET 2>&1', $output, $returned);
The 2>&1 part redirects stderr to stdout, so I can catch it with $output... Have tried redirecting to a file or to NUL without getting any results. I'm not to keen on using COM either, as it is a completly black area to me...

regards tores
Post Reply