On Thu, 16 Sep 2004 16:40:13 -0400, Don Myers <[EMAIL PROTECTED]> wrote:
> All, I have a PHP Command Line Interface (CLI) script which uses stdin and
> stdout for reading and writing to/from the terminal.  Now I need to have
> that script open another PHP-CLI script which ALSO needs to uses stdin and
> stdout for reading and writing to/from the terminal. This script may in turn
> open another... and another.... Of course after the script ends it returns
> to the line in the script that called it and so on. Until it's "done"
> 
> I am writing a bunch of PHP-CLI scripts which open other helper PHP-CLI
> scripts which may be called together or apart (so includes don't work)


> cat first.php second.php third.php
#!/usr/bin/php
<?php
echo "I am first.php\n";
system('/usr/bin/php -f ./second.php');
?>

#!/usr/bin/php
<?php
echo "I am second.php\n";
system("/usr/bin/php -f ./third.php");
?>

#!/usr/bin/php
<?php
echo "I am third.php\n";
?>

> ./first.php
I am first.php
I am second.php
I am third.php


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to