Reply to Re: Securely serving files

Your name:

Reply:


Posted by Jasen Betts on 02/12/06 08:11

On 2006-02-12, Nicholas Sherlock <N.sherlock@gmail.com> wrote:
> Jasen Betts wrote:
>> if it's a *nix server make a link instread of a copy of the file it's much
>> faster, and uses much less disk space.
>
> The Symlink() command? Awesome!

symlinks depend on the apache configuration.

hard links (the link() function) are indistinguishable from
real files.

as long as the file you're linking to is on the same partition as the web
site (and is readable by PHP - you already said it was) link() is probably
the best way to go.

>> Store the names and delete any that have been sitting there for more than 30
>> seconds, or spawn a background script that sleeps for 30 seconds and then
>> deletes the copy.

shell_exec (" ( sleep 30 ; rm '$filename' ) &");

but that doesn't work in safe mode... :( someone else may have an
alternative.


Bye.
Jasen

[Back to original 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

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