cozmosys Posted April 9, 2009 Share Posted April 9, 2009 I'm new to php and I went through a tutorial and wrote the standard 'hello world' program, which I've listed below. However, when I load the page into my browser, I get what I think is extra stuff at the top of my page. Can anyone explain why? Or, tell me how to stop it from apperaing? I've also pasted the characters that my browser returns. <html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html> {\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww9000\viewh9000\viewkind0 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural \f0\fs24 \cf0 \ \ \ \ \ Hello World \ \ } Quote Link to comment https://forums.phpfreaks.com/topic/153315-solved-extra-stuff-echoed-from-a-hellophp-page/ Share on other sites More sharing options...
redarrow Posted April 9, 2009 Share Posted April 9, 2009 what editor you using please. looks like it a problem with your editor not php. Quote Link to comment https://forums.phpfreaks.com/topic/153315-solved-extra-stuff-echoed-from-a-hellophp-page/#findComment-805442 Share on other sites More sharing options...
wildteen88 Posted April 9, 2009 Share Posted April 9, 2009 What text editor are using to create your .php script? You should use a plain text editor such as Notepad. Also make sure you are saving the file as ASCII encoding Quote Link to comment https://forums.phpfreaks.com/topic/153315-solved-extra-stuff-echoed-from-a-hellophp-page/#findComment-805443 Share on other sites More sharing options...
cozmosys Posted April 9, 2009 Author Share Posted April 9, 2009 Most excellent! It was my editor. Thank you very much!! I used TextEdit, as I'm a Mac user. I was able to use Word and save it as text only with line breaks. I'll dig around for another editor. If you have any suggestions, I'd appreciated them. Thanks again!! Quote Link to comment https://forums.phpfreaks.com/topic/153315-solved-extra-stuff-echoed-from-a-hellophp-page/#findComment-805466 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.