|
Posted by laredotornado@zipmail.com on 07/03/06 20:41
I want the users to download a file with an ".html" extension. What
kind of headers would I use to save creating that on a server and have
that downloaded right to the Desktop (or whereever their default save
location is)?
Thanks, -
Rik wrote:
> laredotornado@zipmail.com wrote:
> > Hi,
> >
> > I'm using PHP 4.3. There is a section of my application in which I'd
> > like users to be able to download a custom file. The file would be
> > different for each user, so I was planning on creating it on the fly
> > when they click "Download". However, I would like to delete the file
> > from the server a certain period of time after they've downloaded it.
> > (It's a 3 or 4K file). How can I do this?
>
> filemtime() could be used for this.
>
> However, if your file is made dynamically, and downloaded only by a specific
> user, is there any reason to save it as a file to begin with? With proper
> headers and PHP output you can just dynamically create/'fake' the file each
> time it is required, without having to save it, track it, and clean it up.
>
> Grtz,
> --
> Rik Wasmus
[Back to original message]
|