Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003

    Simple question.

    I've been designing a site for someone. The pages are all .php. When I upload it to their server, the files display as code in Firefox and Safari, but display fine in IE. When I name the extensions .php5 or .php3, it will display fine in Firefox. Any other .php page I've made display perfectly in Firefox on other servers.

    What's going on?

    Here's the page, by the way:

  2. #2
    The problem is your content-type. Your webserver is sending out a header:

    Content-Type: text/plain

    which indicates that it's plain text. Internet explorer ignores this content type and shows it as HTML reguardless, but Mozilla follows it and shows it as text.

    You can view your headers with web-sniffer[dot]net

    I'm not sure why it would send out that content-type, because php should send as text/html by default.

    I would contact the host about this because it appears to be a misconfiguration with their server.

    TO get around this problem, you can try the code at the top of each .php file:
    PHP Code:
    ("Content-Type: text/html");

  3. #3
    Join Date
    Feb 2005
    I am air u breathe
    If it is your personal server then please check your apache configuration and make sure that the application types are specified correct there. Else you will need to add:

    AddType application/x-httpd-php .php

    to your .htaccess and try back.

    It is reliability that counts...
    Few tips

Posting Permissions

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