|
Posted by Rik on 07/03/06 16:23
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
Navigation:
[Reply to this message]
|