Re: Tried to run PHP as shell script and got the error...
| From: | Scott Fletcher | Date: | Fri, 11 Mar 2005 19:11:06 +0000 |
| Subject: | Re: Tried to run PHP as shell script and got the error... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-216899@lists.php.net to get a copy of this message | ||
Oh, forgot to add the "!" to the "#/usr/local/bin/php".. Since it's my
first time in shell scripting with php so I wasn't thinking correctly...
"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