Re: storing content data outside the application

From: Date: Tue, 02 Jul 2002 22:06:47 +0000
Subject: Re: storing content data outside the application
Groups: php.general 
Request: Send a blank email to php-general+get-105077@lists.php.net to get a copy of this message
>I have a problem with content data. Currently I do store images inside a >data folder. >/data > >This is causing a problem, because everytime I installan update of the >application on the server I have to move this folder around to the new >version of my application. I am worried that during this coppy an error will >apear, due to my fault, or whatever might happen. The immages are part of a >dataset stored in a mysqldb. So I tryed to store them to blobs, but this is >causing performance problems. Images apear much quicker while comming from >the filesystem. They also seem not to be cached by the client anymore. > >Does anybody know a good method to store the images outside the rootfolder >and still access them the old fashion way? 1. Convince your FTP client not to over-write the images. 2. Move the images outside the web-tree, and use PHP to serve them up. /htdocs /images --------- images.php -------------------- <?php readfile("~/images/$filename"); ?> ----------------------------------------- <IMG SRC=images.php/<?=$filename?>?filename=<?=$filename?> WIDTH=<?=$width?> HEIGHT=<?=$height?> BORDER=0> #1 is way easier and more efficient... -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#105077) next »