Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8397827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:53:15+00:00 2026-06-09T20:53:15+00:00

Ive got a php download script using mod_xsendfile which works perfectly to download certian

  • 0

Ive got a php download script using mod_xsendfile which works perfectly to download certian rar files.

In Chrome and IE it downloads fine, I get the filenames like “0005 – Game Name.rar”

In firefox it always just downloads a file with the name a couple of characters long like “0005 -” it never has the extension so a user might not understand how to rename.

Is there somthing i can change in my script to allow firefox to read the whole filename.

Here is the part of the script that handles the downloading.

header("Content-Type: application/octet-stream"); 
header("Content-Disposition: attachment; filename=$filename"); 
header("X-Sendfile: $file"); 

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:53:17+00:00Added an answer on June 9, 2026 at 8:53 pm

    Quote the filename:

    header("Content-Disposition: attachment; filename=\"$filename\"");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a PHP/HTML/Javascript driven front-end for a MySQL database which archives different files/papers
hey ive got a working php script, and as far as i can tell
I've got a php page which handles requets for file downloads. I need to
Possible Duplicate: PHP list all files in directory ive got a cron job running
i just got an account at: http://www.whoisxmlapi.com/index.php#/whois-api-doc.php?rid=1 ive never parsed XML with c#, how
I've got a PHP script on an Amazon EC2 instance. I changed a couple
Ive got a problem, Im using jquery for my googlemaps thingy Im doin and
There is Java tool (it is called Mallet) http://mallet.cs.umass.edu/download.php which I want to use
ive got this script that echos the information from a mysql database. now it
I've got a regular expression that redirects any files in the folder /downloads to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.