You are here: Re: Strategy for creating files and then cleaning up « PHP Programming Language « IT news, forums, messages
Re: Strategy for creating files and then cleaning up

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация