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]
|