Jump to content

Problem with file type


graham23s

Recommended Posts

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

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');
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.