Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Stuck on Exercise 1 Date: Sun, 15 Jul 2012 16:06:30 +0200 Lines: 52 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net sVmxtzQHhpHwL5C6SgtHvQOw8LZzgHDyv99pUvbY80FkvGiHjRnkZnuCi1kLL4oKDz Cancel-Lock: sha1:zrPxdew8AXHq2wof5XuY7ZmSs8U= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120613 Thunderbird/13.0 In-Reply-To: Xref: csiph.com comp.lang.php:6572 On 15/07/12 14:03, tim.whittingham@googlemail.com wrote: > 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 > > > > My first PHP program > > > print(“Hello, cruel world

\n”); > phpinfo(); > ?> > > As Shake already pointed out, the “ and ” ain't the same as " and you should use a text editor instead of an office application to edit your php scripts. As you seems to be a microsoft user, I suggest you download and install notepad++ and you find their homepage at http://notepad-plus-plus.org > Saved as .html and viewed with Wampserver I got nothing This will tell your Apache that the file will be an html file and it will not be parsed by the php engine (contrary to what The Natural Philosopher wrote). You need to either reconfigure your Apache to handle all .html files as php scripts (this will mean all files ending with .html will be parsed by the php engine and give overhead for your computer if you are serving plain html files), the best solution is to name the file to end with .php and the file will be parsed by the php engine. > but > > \n”); phpinfo(); ?> This for your script file isn't a plain html file, so it will try it's best to understand your HTML and present what you wrote, if you would choose to look at the source of the HTML page in your browser, you will see it's exactly the same as what you wrote in your file. -- //Aho