Re: cli script

From: Date: Mon, 15 Jan 2018 06:47:22 +0000
Subject: Re: cli script
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-326357@lists.php.net to get a copy of this message
On Sun, Jan 14, 2018 at 06:08:33PM -0800, Jeffry Killen wrote: > > > On Jan 14, 2018, at 6:00 PM, Aziz Saleh <azizsaleh@gmail.com> wrote: > > > > On Sun, Jan 14, 2018 at 8:47 PM, Yeni Setiawan <yenisetiawan@gmail.com> > > wrote: [snip] > > > > What is your first line of the PHP file? Does it contain the location to > > PHP executable binary (ex: #!/usr/bin/php)? If not you would need to run > > the php file as /usr/bin/php BTO.php. > > I should have included that: > #!/usr/bin/php -f > <?php // ... etc ?> > This might be better handled with the following: #!/usr/bin/env php <?php This is, as I recall, the way the python folks do it. Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com

« previous php.general (#326357) next »