graham23s Posted May 29, 2007 Share Posted May 29, 2007 Hi Guys, i'm having a problem with a file type it's a news index file .nzb file i can upload it ok, and it's in my database as filename.nzb , i can see it on my server as filename.nzb , but when i go to download it to my desktop it turns into filename.xml, my files allowed code is: $file_accepted = array("text/xml","application/octet-stream","application/x-gzip-compressed","application/x-xml"); through testing i have seen that the nzb's mime type is: text/xml is there anyway to download as an nzb , everytime i try i get filename.xml thanks for nay help Graham Link to comment https://forums.phpfreaks.com/topic/53435-problem-with-file-type/ Share on other sites More sharing options...
Lumio Posted May 29, 2007 Share Posted May 29, 2007 How do you download that file? Directly or by php-script by header change If you do it with php look here: www.php.net/header <?php // We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="downloaded.pdf"'); // The PDF source is in original.pdf readfile('original.pdf'); ?> Link to comment https://forums.phpfreaks.com/topic/53435-problem-with-file-type/#findComment-264038 Share on other sites More sharing options...
graham23s Posted May 29, 2007 Author Share Posted May 29, 2007 Hi Mate, i'm doing i tlike this: <a href="nzbs/filename.nzb">Download File</a> the just "right click" saves as, that's when it turns into an .xml file. cheers Graham Link to comment https://forums.phpfreaks.com/topic/53435-problem-with-file-type/#findComment-264047 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.