Re: Detecting script's execution model
| From: | Colin Viebrock | Date: | Wed, 05 May 1999 22:12:47 +0000 |
| Subject: | Re: Detecting script's execution model | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-5377@lists.php.net to get a copy of this message | ||
> Is it possible to detect whether the script is being executed in the web
> browser through Apache or cgi-bin, or if it's being executed in the shell?
One way to tell whether you are using Apache or whether you are using CGI is
to check if $SERVER_SOFTWARE is set. It only is under Apache.
Now, to determine if you are using CGI on the web or CGI in the shell ...
I don't know. I'd try outputing phpinfo(), and see where they differ. Maybe
there is a port number setting, or something else.
Let me know, would you?
- colin
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net