I never work with PHP from the commandline,. but i think it is not possible to use HTML in a php file, so try replacing this: <html> <body><?php with <?php echo "<html><body>"; and replace this: ?></body> </html> with this: echo "</body></html>"; ?> I think that will fix it. Tijnema On 3/8/07, Jonathan Kahan <jonathan@xxxxxxxxxxxxxx> wrote:
Unfortunately not. I used the vi editor within Linux to create the file. I am using a windows machine locally but the server I am doing this all in is a Linux server which I am accessing through putty. ----- Original Message ----- *From:* Tijnema ! <tijnema@xxxxxxxxx> *To:* Jonathan Kahan <jonathan@xxxxxxxxxxxxxx> *Cc:* php-general@xxxxxxxxxxxxx *Sent:* Thursday, March 08, 2007 12:03 PM *Subject:* Re: Intro to PHP question Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan <jonathan@xxxxxxxxxxxxxx> wrote: > > Hi all, > > I am using a linux server. When the php file below (uri.php) is run from > the > command line I get the following error. Any ideas on what I could do > differently? > > Thanks for any help, > > Jonathan > > ../uri.php: line 1: syntax error near unexpected token `newline' > ../uri.php: line 1: `<html>' > > <html> > <body><?php > $d=date("D"); > if ($d=="Fri") > echo "Have a nice weekend!"; > else > echo "Have a nice day!"; > ?></body> > </html> > > > Kind Regards > Jonathan Kahan > -------------------------------------------------------------------- > Systems Developer > Estrin Technologies, inc. > 1375 Broadway, 3rd Floor, New York, NY, 10018 > -------------------------------------------------------------------- > Email: jonathan@xxxxxxxxxxxxxx > Web: http://www.estrintech.com > > -- > PHP General Mailing List ( http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >