Display image files from path in database.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
logike30
Forum Newbie
Posts: 5
Joined: Sat Jan 10, 2009 7:33 pm

Display image files from path in database.

Post by logike30 »

I have a database contains path information that points to images on the hard drive ie.. c:\images\picture01.jpg. I'd like to use this entry to display the image on the website with PHP. From what I understand, I'd have to flip the backslashes to forward slashes first.. is this correct? If so, how? If not, what other method is there to take this directory/file entry and display it. The image files are not located in the database, just the path and some exif info. Thanks for any help!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Display image files from path in database.

Post by requinix »

A simple search-and-replace will work fine.

Are these images available over the internet (if you know the path)? If not you'll need a special PHP script to display one.
logike30
Forum Newbie
Posts: 5
Joined: Sat Jan 10, 2009 7:33 pm

Re: Display image files from path in database.

Post by logike30 »

These images are located on the local machine.
Post Reply