Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13086 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95231 invoked by uid 1010); 30 Sep 2004 21:51:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 93290 invoked from network); 30 Sep 2004 21:50:11 -0000 Received: from unknown (HELO gw2.emini.dk) (192.38.9.232) by pb1.pair.com with SMTP; 30 Sep 2004 21:50:11 -0000 Received: from blaster (gw1.emini.dk [212.242.124.121]) by gw2.emini.dk (Postfix) with ESMTP id 9EC31469B5; Thu, 30 Sep 2004 23:50:10 +0200 (CEST) Message-ID: <007301c4a737$77e3e380$0b00000a@blaster> To: "Jason Garber" , References: <606653278.20040930171001@ionzoft.com> Date: Thu, 30 Sep 2004 23:50:14 +0200 Organization: Emini ApS MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.3790.181 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181 Subject: Re: [PHP-DEV] CLI Constant From: edink@emini.dk ("Edin Kadribasic") Checkout the PHP_SAPI constant . Edin ----- Original Message ----- From: "Jason Garber" To: Sent: Thursday, September 30, 2004 11:10 PM 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 > > >