Re: Append to STDIN
| From: | David Robley | Date: | Fri, 09 Nov 2001 01:57:28 +0000 |
| Subject: | Re: Append to STDIN | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73980@lists.php.net to get a copy of this message | ||
On Fri, 9 Nov 2001 11:58, Cleber S. Mori wrote:
> Hi guys...
>
> I have a perl script which adds automatically contents to my html file.
> I have been done this manualy, from a unix shell, but now I want to
> make the PHP do-it-for-me.
>
> As I already have the perl script, I won't rewrite it again, so, how
> can I make a PHP variable ($foo) to go to the STDIN?
>
> In other words, I want to execute my htmladd.pl with the file argument,
> and get the STDIN.
>
> like
> echo "STDIN"| htmladd.pl my_html_file.html
> But I want to STDIN be a PHP variable, that is because I want to make
> the updates over the net.
>
> Thanks!
> Hey, sorry for my bad english!
>
> Take care!
Look at exec(), system() and perhaps the use of backticks [``] to executa
a command and pass a variable.
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
"I put all my money into an IRA," Tom said interestedly.