www.webdeveloper.com
Results 1 to 6 of 6

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

  1. #1
    Join Date
    Oct 2012
    Posts
    78

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

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

    Code:
    <!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

    Code:
    <!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
    Posts
    78
    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
    Location
    Ankh-Morpork
    Posts
    19,144
    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?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Oct 2012
    Posts
    78
    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

    localhost
    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.

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

  6. #6
    Join Date
    Mar 2009
    Posts
    452
    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