Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder BabyJack's Avatar
    Join Date
    Apr 2008
    Location
    Somewhere.
    Posts
    602
    Thanks
    43
    Thanked 6 Times in 6 Posts

    Download not working, just turns into XML.

    Hey! This issue is relevant to IE and Safari. When the first download is clicked here: http://wifee.missingstudios.com/downloads/housing.php, it turns into XML.

    Any idea how to overcome this?

    In IE, it comes up with an XML Error.


    BabyJack
    Enlightenment in Coding
    Validate before Posting | Google is your friend for PC Problems | Make sure you have a doctype

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    It doesn't turn into xml - it already is XML, it appears. Check out the source of the error page in IE. It's XML but it has the sims packager junk at the beginning.

    You might ought to use a separate download script. Here's an example that I use for PDFs.
    PHP Code:
    <?php
    header
    ('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; '
           
    .'filename="gap_application.pdf"');
    readfile("gap_application.pdf");
    ?>
    That's the whole file. If it's named download-app.php, then my download link would be <a href="download-app.php">download</a>.

    Doing it this way, you have more control over the disposition of the content. By just providing the link, you're allowing the browser to handle it as it sees fit. IE is "helping" you by trying to handle the sims pack XML as a regular XML file.

  • Users who have thanked tomws for this post:

    oesxyl (05-24-2008)


  •  

    Posting Permissions

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