Re: Detecting invocation from command-line
| From: | rasmus at lerdorf dot on dot ca | Date: | Tue, 13 Jun 2000 03:55:31 +0000 |
| Subject: | Re: Detecting invocation from command-line | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21170@lists.php.net to get a copy of this message | ||
You could check if SG(request_info).request_method is set. If it isn't,
chances are you are running from the command line.
On Mon, 12 Jun 2000, Andrei Zmievski wrote:
> Is there a way in the API to know whether PHP is being run from the
> command line as opposed to as a module or cgi-binary under a web server?
>
> -Andrei
>
>