RE: [PHP] accessing files not in www root directory.

From: Date: Mon, 02 Jul 2001 16:56:25 +0000
Subject: RE: [PHP] accessing files not in www root directory.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55869@lists.php.net to get a copy of this message
do you have the image data in the database, or are all the images stored in the filesystem? it appears to be the latter... so i'd say either: 1) move the images into the webserver's document root, or somewhere web-accessable. 2) symlink them permanently. i can't understand why you'd want to create/delete symlinks everytime a browser requested images... it'd be much faster and more efficient to just link the images somewhere within the document-root and leave them there. > -----Original Message----- > From: Sterling Anderson [mailto:sterling@sterlinganderson.net] > Sent: Sunday, July 01, 2001 12:40 AM > To: php-general@lists.php.net > Subject: [PHP] accessing files not in www root directory. > > > Hi, > I am trying to write a page that will perform a select on a DB and get the > path and file name of an image. Then display the image. > The DB part if fine but I am having difficulty figuring out how to get the > images to display. For example: > > result from select: > $file_path = "/home/pics/friends/" > $file_name = "bob.jpg" > > Now, say my web root directory is "/etc/http/wwwroot" > > How do I create a link to my file "/home/pics/friends/bob.jpg"? > I tried symlink() but the link created appears to hang around after it is no > longer needed. > > By the way, this is a Linux server running Apache. > > Any ideas? > > Thanks, > > Sterling Anderson > sterling@sterlinganderson.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#55869) next »