FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Downloading files, without internet renumbering...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Downloading files, without internet renumbering... [message #169361 is a reply to message #169359] Wed, 08 September 2010 15:35 Go to previous messageGo to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma:
Senior Member
On 9/8/2010 4:37 PM, jodleren wrote:
> Hi all
>
> I have this simple script to download file frome anywhere. It gets a
> parameter and passes the file on.
> The problem is that files like ABC01234.nc works well.
> Then someone adds a version to is to it becomes ABC01234.2.nc - the .2
> got added causing my browser (?) to change it ABC01234[1].2.nc - the
> [1] bothers me.
>
> CanI get rid of that?
>
> WBR
> Sonnich
>

Hi Sonnich,

That had nothing to do with PHP.
I expect it is your browser that numbers the files.

Firefox, for example, will happily save files in the same directory (the
one you appointed as download directory), and will start numbering them
if you download a file with the same name in that directory.

So there is nothing wrong with the following header:
header("Content-Disposition: attachment; filename=\"$filename\"");


Regards,
Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Php Switch Case
Next Topic: Re: Php code for ajax encoding
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 21:07:43 GMT 2024

Total time taken to generate the page: 0.08010 seconds