Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,084 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,545 people online right now. Registration is fast and FREE... Join Now!




Php Outputs Html But Browser Reads As Text File?!

 
Reply to this topicStart new topic

Php Outputs Html But Browser Reads As Text File?!

Markp
5 Sep, 2002 - 07:48 PM
Post #1

D.I.C Head
**

Joined: 18 Jan, 2002
Posts: 76

Why does this happen:

The script is outputting HTML, but the browser is reading it as text?!

I don't get it?!
User is offlineProfile CardPM
+Quote Post

supernova333
RE: Php Outputs Html But Browser Reads As Text File?!
5 Sep, 2002 - 08:04 PM
Post #2

D.I.C Addict
****

Joined: 12 Mar, 2002
Posts: 590


My Contributions
Look at the source:

CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0051)http://photoframe.sourceforge.net/photoframe.source -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY><XMP><HTML>
<HEAD>
 <TITLE>Mark's Photo Album</TITLE>
 <META NAME="Description" CONTENT="Made with PhotoFrame 6.7, http://photoframe.sourceforge.net">
 <LINK REL="SHORTCUT ICON" HREF="http://photoframe.sourceforge.net/pf.ico">
</HEAD>
<FRAMESET COLS="150,*" BORDER=1>
 <FRAME NAME=imargin SRC="index.php?margin=150" FRAMEBORDER=0
        marginwidth="0" marginheight="0" noresize SCROLLING=AUTO>
 <FRAME NAME=imain SRC="index.php?intro=1" FRAMEBORDER=0 SCROLLING=AUTO>
 <NOFRAMES>
    This site works best with frames, which your browser doesn't support.
    You can still browse this photo album, though, by starting
    <A HREF="index.php?margin=150">here</A>
 </NOFRAMES>
</FRAMESET>
</HTML>

</XMP></BODY></HTML>


The XMP tags are like CODE tags, they output the code just the way it is without processing. Remove the top header and bottom bit so just this is in your file:

CODE
<HEAD>
 <TITLE>Mark's Photo Album</TITLE>
 <META NAME="Description" CONTENT="Made with PhotoFrame 6.7, http://photoframe.sourceforge.net">
 <LINK REL="SHORTCUT ICON" HREF="http://photoframe.sourceforge.net/pf.ico">
</HEAD>
<FRAMESET COLS="150,*" BORDER=1>
 <FRAME NAME=imargin SRC="index.php?margin=150" FRAMEBORDER=0
        marginwidth="0" marginheight="0" noresize SCROLLING=AUTO>
 <FRAME NAME=imain SRC="index.php?intro=1" FRAMEBORDER=0 SCROLLING=AUTO>
 <NOFRAMES>
    This site works best with frames, which your browser doesn't support.
    You can still browse this photo album, though, by starting
    <A HREF="index.php?margin=150">here</A>
 </NOFRAMES>
</FRAMESET>
</HTML>

User is offlineProfile CardPM
+Quote Post

Markp
RE: Php Outputs Html But Browser Reads As Text File?!
5 Sep, 2002 - 08:31 PM
Post #3

D.I.C Head
**

Joined: 18 Jan, 2002
Posts: 76

Grand! All fixed thanks! biggrin.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 08:02PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month