RE: [PHP-DEV] CLI Constant

From: Date: Thu, 30 Sep 2004 21:54:46 +0000
Subject: RE: [PHP-DEV] CLI Constant
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-13089@lists.php.net to get a copy of this message
PHP_SAPI constant or php_sapi_name -----Original Message----- From: Jason Garber [mailto:jason@ionzoft.com] Sent: Thursday, September 30, 2004 2:10 PM To: internals@lists.php.net Subject: [PHP-DEV] CLI Constant Hello internals, What is the best way, from within a php script, to tell that the script is being run on the command line? I've used if(defined('STDIN')) but that seems kind of kludgey. If there is no better way, perhaps we could add constant called (SAPI_TYPE = 'CLI') or something like that to the language to facilitate this? -- Best regards, Jason Garber mailto:jason@ionzoft.com IonZoft, Inc. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.internals (#13089) next »