473,396 Members | 1,871 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,396 software developers and data experts.

Content Type save as dialog [1] appearing in name??

I'm sending back a file as the content type but when the file name is
of test.class.php the file dialog (I'm using IE 6 Windows) saves it as
test[1].class.php. If I send test.php it saves it as test.php. I need
it to default save as "test.class.php". Anyone know why this is and how
to get around it? Heres the exact code I'm using.

header('Content-Type: application/octetstream; name="test.class.php"');

header('Content-Type: application/octet-stream;
name="test.class.php"');
header('Content-Disposition: attachment; filename="test.class.php"');

Jul 17 '05 #1
1 2019
ry******@yahoo.com wrote:
I'm sending back a file as the content type but when the file name is
of test.class.php the file dialog (I'm using IE 6 Windows) saves it as test[1].class.php. If I send test.php it saves it as test.php. I need it to default save as "test.class.php". Anyone know why this is and how to get around it? Heres the exact code I'm using.

header('Content-Type: application/octetstream; name="test.class.php"');
header('Content-Type: application/octet-stream;
name="test.class.php"');
header('Content-Disposition: attachment; filename="test.class.php"');


This is IE only bug. Will happen when you use more than one dot in
file name.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #2

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

Similar topics

3
by: Chan | last post by:
Hi I want to display save dialog box and display that file name in a text box All I want to do is, On click of a button, display save dialog box and display that file name in a text box Later...
3
by: osmethod | last post by:
Hello, I'm using Access 97 and I would like to save a query but, give the user the option of the type (e.g. Txt, Xl, Mdb, dbf) etc. I see this functionality in the Save/Export, Save as...
4
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. ...
10
by: GJP | last post by:
Hello. Ive been asked to make my own notepade for college assignment. All ig going well, but i cant get the save to work. I can get Save a (shows dialog box), i can get it to just save too,...
2
by: Ruskin Hardie | last post by:
There is an iframe in my document that is hidden, which is the target for a submitted form. When the form is submitted, some javascript sets a hidden div, to displaying, eg: ...
10
by: Michael | last post by:
I have a IIS web site that works fine on one server but not another. I do not know if the problem is an IIS setting or something else so I will try to include as much detail as I have figured out...
0
by: u01jmg3 | last post by:
Hi, basically I create a png image on the fly and that all works fine but when I go to save the image it's taking the name of the .php script used to create it as its default name. e.g. I visit...
0
by: ftech | last post by:
I am saving PDF files in SQL Server 2005 as an image and retrieve them back by their document ids. I use the following code: byte buffer = (byte)dtDoc.Rows; if(buffer != null) { ...
12
by: Dave H. | last post by:
Please redirect me if this message is posted to the wrong group. Given the intention of delivering content to an HTTP user agent (such as Internet Explorer) which is to be immediately opened by...
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: 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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.