Results 1 to 6 of 6

Thread: [RESOLVED] PHP <!Doctype> error. IE9

Hybrid View

  1. #1
    Join Date
    Oct 2012

    resolved [RESOLVED] PHP <!Doctype> error. IE9

    When I run my index.php with the following doctype:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    It works in both Chrome and Firefox everything is displayed. The problem is in IE9 it just shows the html sourcecode.
    Now I know it't not the code because when the file extension was index.html it displayed fine in IE9.

    I've also tried

    <!DOCTYPE html>
    Which is ment to work with all the new browsers. Probably a stupid question but anyone shed some light?

  2. #2
    Join Date
    Oct 2012
    Update: Not a DOCTYPE error. In fact its the XAMPP webserver for some reason http://localhost/htdocs is unable to be found in ie. And I can't manage to get the file:///C:/xampp/htdocs/myfiles/index.php to work in ie. Anyone know how to solve this please reply. Thanks.

  3. #3
    Join Date
    Aug 2004
    It definitely won't work if you use a "file://" protocol type, as you'll then be bypassing the web server, which means PHP won't be invoked. I have no idea why IE would be misbehaving with the "http://localhost", other than maybe you should clear its cache and then try again?
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  4. #4
    Join Date
    Oct 2012
    Ok. So I had to delete the default index.php & index.html that comes with the XAMPP.

  5. #5
    Join Date
    Oct 2012
    Thanks for the reply. "http://localhost/xampp/htdocs/myfiles" should work but I get:

    Object not found!

    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

    If you think this is a server error, please contact the webmaster.

    Error 404

    Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7

    So I've must of not set-up XAMPP properly or giving the program the correct permissions.

  6. #6
    Join Date
    Mar 2009
    maybe there was some problem with your directory index configuration in httpd.conf

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