[PHP] Accessing piped data in PHP shell script

2002-01-31 Thread David Yee
How can I access data/parameters piped into a PHP shell script? E.g: cat foo.txt | php -q myscript.php In this example I want to take the contents of foo.txt and store it into a variable/array in myscript.php. I tried $argv[] but no go. Thanks. David -- PHP General Mailing List

Re: [PHP] Accessing piped data in PHP shell script

2002-01-31 Thread David Yee
, 2002 4:30 PM Subject: [PHP] Accessing piped data in PHP shell script How can I access data/parameters piped into a PHP shell script? E.g: cat foo.txt | php -q myscript.php In this example I want to take the contents of foo.txt and store it into a variable/array in myscript.php. I tried $argv

Re: [PHP] Accessing piped data in PHP shell script

2002-01-31 Thread Jeff Sheltren
Have you tried running the program from your php script? Something like: $stuff = System(cat foo.txt); I have done something similar, but I don't recall exactly how I did it. Jeff At 04:30 PM 1/31/2002 -0800, David Yee wrote: How can I access data/parameters piped into a PHP shell script?