Re: [PHP] cli script
On Sun, Jan 14, 2018 at 06:08:33PM -0800, Jeffry Killen wrote:
>
> > On Jan 14, 2018, at 6:00 PM, Aziz Saleh <azizsaleh@xxxxxxxxx> wrote:
> >
> > On Sun, Jan 14, 2018 at 8:47 PM, Yeni Setiawan <yenisetiawan@xxxxxxxxx>
> > 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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php