Fallen at the first hurdle ...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hareti
Forum Newbie
Posts: 2
Joined: Sun Mar 06, 2011 5:27 am

Fallen at the first hurdle ...

Post 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 ...
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Fallen at the first hurdle ...

Post 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
hareti
Forum Newbie
Posts: 2
Joined: Sun Mar 06, 2011 5:27 am

Re: Fallen at the first hurdle ...

Post 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 ...
Post Reply