Forum Moderators: coopster

Message Too Old, No Replies

writing a config.php file for image directory?

         

xpiamchris

1:42 am on Jan 16, 2009 (gmt 0)

10+ Year Member



So I have succesfully uploaded images to a directory on my server... and i have the image name next to the appropriate mysql row.

What Im stuck on is... how would I have it so that I can call on the file name and have the image display?

I read somewhere to write a config.php file so that I can direct it to the right directory/location?

so for example...
$imagelocation = "/filedirectory"/
and then I can call the file name through mysql queries?

Can someone clarify or adjust this to operate the best way?
thank you!

eelixduppy

9:09 pm on Jan 17, 2009 (gmt 0)



You would grab the image name from the database and then concatenate the directory path to the front. Something like this:

$image = '/path/to/images' . $filename;

Is that what you are talking about? Not quite sure.