FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Stuck on Exercise 1
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Stuck on Exercise 1 [message #178640 is a reply to message #178639] Sun, 15 July 2012 12:16 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
tim(dot)whittingham(at)googlemail(dot)com wrote:
> To my great embarassment. Came away with a copy of PHP5 &
> MySQL Bible thinking to do a couple of hours study
> every day of my hols with a view to learning a little
> elementary PHP to assist me with my CMS website work.
> Read through the first couple of Chapters until I came to
> Chapter 4 and 'Your First PHP Program 'Hello World'' in
> which I am instructed to type
>
> <HTML>
> <HEAD>
> <TITLE>My first PHP program</TITLE>
> </HEAD>
> <BODY>
> <?php
> print(“Hello, cruel world<BR><BR>\n”);
> phpinfo();
> ?>
> </BODY>
> </HTML>
>
> Saved as .html and viewed with Wampserver I got nothing
>
> but
>
> \n”); phpinfo(); ?>
>
> on the resulting page. Copied and pasted in case of
> typos, same result. Installed EasyPHP and got the same
> result. Uploaded file to webserver and viewed it on the
> web:
>
> \n”); phpinfo(); ?>
>
> on its own and nothing but.
>
> Humph. So, Help please.
>
> Tim W

AFAIK all php programs MUST start with <?php even if they are
immediately reverted to text with ?>

So try

<?php ?>

as the first line.

>
>


--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Lost $_SESSION in Google Chrome
Next Topic: Business Developer for IT company
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 05:23:19 GMT 2024

Total time taken to generate the page: 0.05015 seconds