Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.