You are here: Re: Tried to run PHP as shell script and got the error... « PHP « IT news, forums, messages
Re: Tried to run PHP as shell script and got the error...

Posted by BlackDex on 10/04/92 11:10

Try to put this at top.
!/usr/local/bin/php
so change the # for a !, becous thas is what is used to execute scripts etc.. :).

Hoop it will work.

Kind Regards,
BlackDex

"Scott Fletcher" <scott@abcoa.com> wrote in message news:20050311185652.99977.qmail@lists.php.net...
> Hi! I'm trying to run PHP as a shell script but I got the error message...
> Source code below is ...
>
> --snip--
> #/usr/local/bin/php
> <?
> echo "Hello World!!\n";
> ?>
> --snip--
>
> Attempt to run the file below and got the error
>
> --snip--
> -=[/usr/local/bin]==>./ecbi_inquiry_pull_experian.sh
> Hello World!!\n
> ./ecbi_inquiry_pull_experian.sh: line 4: syntax error near unexpected token
> `?>'
> ./ecbi_inquiry_pull_experian.sh: line 4: `?>'
> --snip--
>
> I checked to see if there's no spaces at the end on line 4 and there
> isn't... So, how do I get it working so I can hook up the file to the
> crontab.
>
> Thanks,
> FletchSOD

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация