Piping and the CLI parser
| From: | Nicolas Frisby | Date: | Tue, 05 Aug 2003 05:25:47 +0000 |
| Subject: | Piping and the CLI parser | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158408@lists.php.net to get a copy of this message | ||
Greets everybody.
My question regards psuedo-DOS (XP cmd.exe) piping and the CLI php parser.
If you could help please continue reading.
The documention specifies that the CLI php parser "sets up" STDIN and its
kin.
It does in fact work fine assuming the STDIN is the console, but while I was
just toying around with my File Type default command (setting it up WinXP so
that 'foobar.php arg1 arg2' entered at the command line actually executes
the script with arguments), I attempted some piping; which, through very
shallow research, I've come to think uses STDIN.
It fails; no piping whatsoever. Even the simplest 'dir | echo.php', where
echo just implodes() $argv and echoes, gives no output.
Is my suspicion that the CLI php parser does not set up STDIN to receive
from a pipe correct, or am I missing something here?
Thank you very much for your time,
Nick
ps - the type of File Type work I used to make the command line work is
described here:
http://www.php.net/manual/en/features.commandline.php
-> do an in-page
search for "phpNOSPAM" to find the comment quickly
pps - if someone could try similar piping on a *nix box, I'd be interested
to know how that goes