www.webdeveloper.com
Results 1 to 6 of 6

Thread: Firefox displays page as html code!?

  1. #1
    Join Date
    Feb 2008
    Location
    Easton, PA
    Posts
    24

    Firefox displays page as html code!?

    So, I was adding another page using the exact same formatting as all my other pages in Dreamweaver. I checked how it looked in DW throughout the coding process and when I finished I checked it in FF just to make sure. The page was displayed as the HTML code!! The file is a php file because of 3 lines of php code at the bottom of the page, but otherwise is html. The thing that gets me is that all the other pages work perfectly in FF and they all draw from the same CSS file and I didn't really use anything special. What happened? What does it meant when FF displays a page as html code? I checked the page in Opera and it worked fine.

    By the way, I have the latest version of FF: 2.0.0.12
    I couldn't check it in IE since my IE doesn't work...

    I would prefer to not have to post my code up here since it is a couple hundred lines and I don't know where the problem is. I don't know if anyone can really help, but if you could make suggestions for things to look for or common problems that make this happen, that'll be great.

    Thanks!
    LT

  2. #2
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    1,043
    Does the page have a .php file extension, or have you set htaccess to parse php as html? Does your server support php?

  3. #3
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Unless you don't wish to reveal your code, a 'couple hundred lines' of code is insignificant as far as post-worthy. That is what this forum is here for.
    You could ZIP the file and attach, or provide a URL. At any rate, there are 'tools' at my/our disposal that can read & alalyze the code in a second or two, providing a detailed show of the cited errors/warnings.

    Basically, -we need to see your code in order to help you.
    Last edited by WebJoel; 02-09-2008 at 05:47 PM.
    I build for: Firefox and tweak for IE

  4. #4
    Join Date
    Feb 2008
    Location
    Easton, PA
    Posts
    24
    I fooled around with the code a bit and I found that if I changed nothing except make the file a .html instead of .php it worked (except for the php code of course).

    I don't have php installed on my computer and I won't get my server for a week or so, so I can't actually see the php in the browser. However, all the other pages with the same php code work fine in the browser, its just this one and nothing is especially different. I copied the code over from the other pages!

    I am kind of new to php so, what is the htaccess?

  5. #5
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Add this to your .htaccess file in Apache:
    AddType application/x-httpd-php .html
    I build for: Firefox and tweak for IE

  6. #6
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    1,043
    Quote Originally Posted by Lord Tataraus
    ..........what is the htaccess?
    Seek and ye shall find - in ths case entering htaccess into Google, and accepting the top line.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles