command line or http browser?
| From: | ermelir | Date: | Thu, 24 Jul 2003 16:06:01 +0000 |
| Subject: | command line or http browser? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156673@lists.php.net to get a copy of this message | ||
Hi list,
I search to detect if a script is call from command line or if the call from
a client http browser.
for doing that, I test if:
php_sapi_name()=='cli'
which returns TRUE if script calls from command line; this work fine with
PHP 4.2, but with PHP 5 php_sapi_name() returns cgi-fcgi
so, I would know if with others php version there is others returns values?
and if there is another way to detect if script is call from command line?
thanks in advance for yours answers
best regards
_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1čre messagerie
instantanée de France