RE: [Nolug] In case you wanted to know how big 2 to the 3,000, 000is...

From: Petri Laihonen <pietu_at_weblizards.net>
Date: Thu, 1 Jul 2004 10:02:07 -0500 (CDT)
Message-ID: <1988.68.14.52.165.1088694127.squirrel@secure.weblizards.net>

> --- Petri Laihonen <pietu@weblizards.net> wrote:
>> >> Thanks.
>> >> Can that be run from the CLI, or must it be embedded in a web
>> >> page?
>> >
>> > It can be run from the CLI if you add, on the first line,
>> >
>> > #/usr/local/bin/php -q
>> >
>> > (or wherever your php binary is installed). The "-q" is the 'quiet'
>> > argument.
>> >
>>
>> I don't use that first line thingy.
>> So far php from CLI has been working as expected.
>>
>> ......err
>> Correction.
>> If I run php scripts with HTML stuff in them, then yes, I use the quiet
>> method, which also can be provided as a parameter in CLI.
>
> Whether you use the "-q" option is, indeed, a matter of preference. Just
> as is using the first line thingy. But I use that first line thingy so
> I can run my script simply by doing
>
> % script_name.php
>
> as opposed to
>
> % /path/to/php script_name.php
>
> Christoph
>

That is very true!

And now that you mentioned, this would have been another solution to the
problem I had some time ago with php scripts not running from the cron.

Cron did not know the path to the php executable, and that first line
would have provided it automatically.

Petri

___________________
Nolug mailing list
nolug@nolug.org
Received on 07/01/04

This archive was generated by hypermail 2.2.0 : 12/19/08 EST