Re: [PHP] Q on php://stdin -- an answer!

2002-02-21 Thread Billy S Halsey
For anyone interested in the answer to this problem, here's what I found out. I ran the script through truss and looked at what was happening. It seems that when trying to use fopen("php://stdin", "r") or fopen("/dev/fd/0", "r"), that as it's reading from the file with fgets(), it does an lse

Re: [PHP] Q on php://stdin

2002-02-20 Thread Billy S Halsey
Hi all, I still have been completely unable to get this to work like it should. I have a simple script: #!/usr/local/bin/php -q So if I call this echo.php, then if I try something like cat /etc/hosts | ./echo.php It prints a # (first line of /etc/hosts) followed by two blank lines. The

[PHP] Q on php://stdin

2002-02-18 Thread Billy S Halsey
Hi all, I've been trying for the last three hours to do something like this: #!/usr/local/bin/php -q And then calling it with something like: cat foo.txt | ./echofile.php The problem is, it will print the first line of foo.txt, and then exit. No matter what I do, I can't get it