473,387 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

php download management - netscape/mozilla bug

I am using the script as below, but there is a problem, in Netscape, and
Mozilla Firebird, a .php is added to the filename when the user is prompted
to save, it's ok in Internet Explorer and Opera though:

$filename="/home/myUserName/filename.exe";
header("Content-Disposition: attachment; filename=filename.exe");
header("Content-Type: application/octet-stream");
header("Content-Length: ".@filesize("$filename"));
readfile("$filename");

This works fine, other than on Mozilla Firebird and Netscape, it wants to
save as filename.exe.php
I've noticed if I make the download link download.php?anyvariable=anyvalue,
the .php IS NOT added however, so I use that to temporarily stop the
problem.
Can anyone suggest what I maybe doing wrong.

Thanks.
Jul 16 '05 #1
0 1738

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
7
by: Daedalus | last post by:
Hi, I have made a php page where people can configure a javascript online with a preview and then dowload the result. Here is the code: <? // Some code that create a temp file ($file handler =...
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
3
by: James Kirk | last post by:
The script below allows me to link to a file and as the user clicks to download, the 'File Download' windows appears as normal, and the user can download... The original page is then redirected...
1
by: Navin | last post by:
hi, guys i am using the following code to force a file download dialog in asp Response.ContentType = "application/vnd.ms-excel" response.AddHeader "content-disposition","attachment; filename="...
4
by: Robert Oschler | last post by:
Hello, I have a web site that has an audio file on it that I make available for download. Right now I'm using the "right-click/save-as" approach. This is because left-clicking the link to the...
2
by: MV | last post by:
Hi, I want to try and get a lottery type script to run in these two browsers before i put it on my site. It runs OK in I.E.6 and my friend says it works in netscape 7 so i can't see the problem...
8
by: William Starr Moake | last post by:
I'm trying to script a download counter that will display the total number on the download page without server-side scripting. Below is my very incomplete beginning. It returns no errors, but...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.