"Phil Powell" <soazine@erols.com> wrote in message
news:16oJb.62427$hf1.41608@lakeread06...[color=blue]
> How do I suppress the lines PHP normally delivers to stdout
> (your browser) if I am doing command-line PHP?
>
> e.g.
>
> stuff.php:
>
> <? echo 'Hello World'; ?>
>
> Calling it from a Red Hat 7.3 command-line terminal I would
> do the following:
>
> php /my/directory/path/to/stuff.php
>
> And I would eventually get
>
> Hello World
>
> But before that, an enormous amount of garbage, particularly
> HTTP header information:
>
> PHP Version 4.2.3
> Content-type: text/html
> Hello World
>[/color]
Your're using the CGI-version, rather than the CLI-version binary, from the
command-line.
[color=blue]
>
> How do I strip everything out except that which I need to see while using
> PHP from the command line? I am having a horrific time using TCL instead.
>[/color]
Relevant information may be obtained from:
http://php.net/manual/en/features.commandline.php
I hope this helps.
Anthony Borla