You have managed to confuse the isntallation process and the way Perl
works with the way PHP works.

If you want to write a custom CGI script for each and every PHP, and
prepend #!/usr/local/bin/php, you just MIGHT be able to do it the way
you're doing it...

But don't do that. :-)

Configure Apache to use PHP, and don't make uri.php executable and
don't run it from the command line, and use something like:
php -q uri.php
when you want to run it from the command line.

On Thu, March 8, 2007 12:52 pm, Jonathan Kahan wrote:
> Hi all,
>
> Dave,
>
> I am attempting to use html for learning purposes. My goal is to begin
> working on a website.
>
> Tijnema,
>
> I tried the below and got the following errors. I can't imagine the
> error on line 3 is a tag issue.
>
> Jonathan
>
> [EMAIL PROTECTED] cgi-bin]# ./uri.php
> ./uri.php: line 2: ?php: No such file or directory
> ./uri.php: line 3: syntax error near unexpected token `"D"'
> ./uri.php: line 3: `$d=date("D");'
> [EMAIL PROTECTED] cgi-bin]# vi uri.php
> [EMAIL PROTECTED]  cgi-bin]# vi uri.php
>
> <?php
> $d=date("D");
> if ($d=="Fri")
>   echo "Have a nice weekend!";
> else
>   echo "Have a nice day!";
> ?>
>   ----- Original Message -----
>   From: Dave Goodchild
>   To: Tijnema !
>   Cc: Jonathan Kahan ; php-general@lists.php.net
>   Sent: Thursday, March 08, 2007 12:43 PM
>   Subject: Re: [PHP] Intro to PHP question
>
>
>   If you are running that from the command line, why do you need html?
> Not sure why you're doing that.


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to