Re: Detect local or remote call?
| From: | Nathan Nobbe | Date: | Thu, 11 Oct 2007 18:50:45 +0000 |
| Subject: | Re: Detect local or remote call? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263115@lists.php.net to get a copy of this message | ||
On 10/11/07, Marcus Mueller <marcus.mueller@grintsch.com> wrote:
>
> Anders Norrbring wrote:
> > Is there a good way to detect in a script if it's called locally from
> > command line, or via a remote browser?
>
> Check out
> <http://www.php.net/manual/en/function.php-sapi-name.php>.
much better:)
php > echo php_sapi_name();
cli
-nathan