On Mon, 17 Nov 2003 12:11:10 +0100, Kornelius Finkenbein wrote:
[color=blue]
> Don't know if you understood my problem: I have no problem with the
> download-script in conjunction with zip-files. The problem exists only,
> if files have more than one point in the filename: f.e.
> "virtualdub_1.5.9.zip". Before the first point I get this: "[1]".
> The result is this filename: "virtualdub_1[1].5.9.zip".
>
> Your filename "rajesh.zip" has only one point, thats no problem.
> BTW, I could not open a test.htm. There were no attachment or link.
>
> But thanks anyway for all.
> Kornelius.
>
>[color=green]
>>
>>
>> I checked Yahoo! It doesn't have this problem and so worked on
>> the headers... Finally found the solution!!!! Now, it works fine!!!
>>
>> <?php
>> //This file name: download_zip.php
>> //Tested in IE6
>>
>> $filename = "rajesh.zip";
>> header('Content-Type: application/x-zip-compressed;
>> filename="foo.bar"');
>> header('Content-Disposition: attachment; filename="' . $filename .
>> '"');
>> readfile($filename);
>> exit;
>> ?>
>>
>> <!---html file name: test.html--->
>>
>> <a href="download_zip.php">test</a>
>>
>>
>>
>> Now, open the test.html and click the link. Please confirm, if
>> it's work for you.
>>
>> ---
>> "Believe it or not, patriotism is one of the worst dividing forces"
>> Email: rrjanbiah-at-Y!com[/color][/color]
Are you sure you don't have a file already called (whatever it was you were
trying to download) already? Usually the [1] comes when some program (like
IE) has to give a downloaded file a new name because the current file
already exists.
Also, have you tried the page in other browsers? If it works in something
else, it's probably just some sort of client-side problem. You could also
get a header-sniffer to see what the actual filename the script is giving
you is.
--
-- Rudy Fleminger
--
sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
--
http://www.pixelsaredead.com