#!/path/to/php -q
chmod +x script.php
--Joe
On Fri, Feb 02, 2001 at 04:36:48PM -0300, Martin A. Marques wrote:
> I want to use PHP to build a script that would run from the comand line. Now
> me problem is how do I make PHP interpretate a chunk of text that is piped to
> it?
> Lets sa
"Martin A. Marques" <[EMAIL PROTECTED]> wrote:
> Lets say my script is named script1.php and I do:
>
> $ less file1 | script1.php
$fp = fopen( 'php://stdin', 'r' );
Then use the standard file handling functions to access the piped data.
--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.8
2 matches
Mail list logo