Page 1 of 1

Fallen at the first hurdle ...

Posted: Sun Mar 06, 2011 5:31 am
by hareti
Hi, My attmpts at learning PHP are moving very slowly. My very first Hello World program is not working correctly. This is the code :

Code: Select all

<?php
echo "<h1>Hello World</h1>";
echo "<h1>This is a test...</h1>";
?>
When I go to the page in a web browser I get

Hello World"; echo "
This is a test...
"; ?>

This is in Chrome, in IE the page is simply blank. What's going on? I thought it may have something to do with unix style CF/LR characters versus windows style. I'm using Notepad++ and have tried saving the file with both styles but still the same probelm. Any other suggestions?

The php file in question is here : http://www.hareti.co.uk/helloworld.html

Thanks for any help ...

Re: Fallen at the first hurdle ...

Posted: Sun Mar 06, 2011 6:01 am
by Darhazer
hareti wrote:Hi, My attmpts at learning PHP are moving very slowly. My very first Hello World program is not working correctly. This is the code :

Code: Select all

<?php
echo "<h1>Hello World</h1>";
echo "<h1>This is a test...</h1>";
?>
When I go to the page in a web browser I get

Hello World"; echo "
This is a test...
"; ?>

This is in Chrome, in IE the page is simply blank. What's going on? I thought it may have something to do with unix style CF/LR characters versus windows style. I'm using Notepad++ and have tried saving the file with both styles but still the same probelm. Any other suggestions?

The php file in question is here : http://www.hareti.co.uk/helloworld.html

Thanks for any help ...
It have to be with php extesion and the hosting have to provide php

Re: Fallen at the first hurdle ...

Posted: Sun Mar 06, 2011 12:21 pm
by hareti
Wow, I'm embarrassed when I think of the amount of time I spent fannying around with this. Works like a charm now ...