Re: Detect local or remote call?
| From: | Anders Norrbring | Date: | Thu, 11 Oct 2007 19:36:37 +0000 |
| Subject: | Re: Detect local or remote call? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263117@lists.php.net to get a copy of this message | ||
Nathan Nobbe skrev:
On 10/11/07, *Marcus Mueller* <marcus.mueller@grintsch.com <mailto:marcus.mueller@grintsch.com>> wrote:Thanks, seems to be the easiest way.. ;) Anders.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