Re: pipe into php
| From: | jeremy brand | Date: | Mon, 28 Aug 2000 16:33:26 +0000 |
| Subject: | Re: pipe into php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13968@lists.php.net to get a copy of this message | ||
You don't want an argv, you want stdin.
-jeremy brand
_______________________________________________________________________
GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9
_ http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more __
On Mon, 28 Aug 2000 Andreas.Halter@comfone.com wrote:
> Date: Mon, 28 Aug 2000 14:03:11 +0200
> From: Andreas.Halter@comfone.com
> To: php-general@lists.php.net
> Subject: [PHP] pipe into php
>
> Hi All,
>
> I'm trying to pipe the output of a programm into a php script.
>
> The following doesn't work. Anybody got an idea why ?
>
> script1:
> #!/bin/php
> <?php
> print ("helloworld");
> ?>
>
> script2:
> #!/bin/php
> <?php
> while ($counter < $argc) {
> print ("$argv[$counter]");
> $counter++;
> }
>
> both files made executable do well. but
>
> bash:# ./script1 | ./script2
>
> doesn't work at all ...
>
> anyone ? ;-)
> thanks, andreas
> **************************************************************
> Andreas Halter Systems Administrator Comfone Ltd
> fon: +41 31 959 3202 fax: +41 31 959 3216 gsm: +41 79 418 9146
> mailto:andreas.halter@comfone.com ///
> http://www.comfone.com
> worbstrasse 225 /// 3073 gümligen /// switzerland
> **************************************************************
> Comfone - the roaming broker
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>