...

View Full Version : Download not working, just turns into XML.



BabyJack
05-23-2008, 01:40 PM
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

tomws
05-23-2008, 04:03 PM
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
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum