Re: PHP standalone script
| From: | Meir kriheli | Date: | Fri, 16 Mar 2001 22:59:43 +0000 |
| Subject: | Re: PHP standalone script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44333@lists.php.net to get a copy of this message | ||
On Friday 16 March 2001 19:31, Don Pro wrote:
> Hi,
>
> I've used PHP scripts in my HTML to provide dynamic content but I was
> wondering if I can also use PHP to create standalone scripts on my UNIX
> box. If so, where is the PHP interpreter and how do I invoke it?
You should configure and compile PHP as a standalone executeable (without
--with-apxs or without --with-apache) and in the top of your script you
should put
#!/usr/bin/php -q
or whatever the path to PHP is (check the output of phpinfo() ).
the -q flag is to supress headers.
--
Meir Kriheli
There's someone in my head, but it's not me - Pink Floyd