Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13089 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1358 invoked by uid 1010); 30 Sep 2004 21:52:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1332 invoked from network); 30 Sep 2004 21:52:49 -0000 Received: from unknown (HELO bobsilva.com) (198.237.84.92) by pb1.pair.com with SMTP; 30 Sep 2004 21:52:49 -0000 Received: from [198.237.72.188] (HELO bobsilva) by bobsilva.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 442208; Thu, 30 Sep 2004 14:29:19 -0700 To: "'Jason Garber'" , Date: Thu, 30 Sep 2004 14:54:46 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcSnMk8S6ujTE+fYQva8BRJUkid3PAABX+rA In-Reply-To: <606653278.20040930171001@ionzoft.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: Subject: RE: [PHP-DEV] CLI Constant From: junkmail@bobsilva.com ("Robert Silva") References: <606653278.20040930171001@ionzoft.com> 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