Re: command line or http browser?

From: Date: Fri, 25 Jul 2003 08:40:38 +0000
Subject: Re: command line or http browser?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-156807@lists.php.net to get a copy of this message
My uneducated guess is you are running cgi version of php binary, which is different from cli version. ermelir wrote:
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


« previous php.general (#156807) next »