note 22799 added to features.commandline
| From: | anonymous@php.net | Date: | Sun, 30 Jun 2002 17:00:46 +0000 |
| Subject: | note 22799 added to features.commandline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32441@lists.php.net to get a copy of this message | ||
How can you tell for sure if a script is running from the command line? In other words, how can I
write a script that can be used either from the command line or from a web browser, and know from
within the script where it's running?
Apache has an $HTTPS environment variable set if you're using HTTPS. Is there any kind of
similar variable - $CLI - that I can use to determine if I'm running from the command line?
--
http://www.php.net/manual/en/features.commandline.php
http://master.php.net/manage/user-notes.php?action=edit+22799
http://master.php.net/manage/user-notes.php?action=delete+22799
http://master.php.net/manage/user-notes.php?action=reject+22799