I have a question concerning absolute path and relative path stored into db.
I stored the path of the uploaded images into the db using 2 options and having hard time displaying the images.
Option1: The paths of the uploaded images are stored using absolute path like the following:
Option2: The paths of the uploaded images are stored using relative path like the following:
When I query my db to get $row[‘path’] and $row[‘imgfile’], so I can use it with the image to display the image, but it doesn’t show any image. But when I checked the property of the image icon, it only says
http://localhost/
When I used option 2 and it works.
Also, when I used it like this is also work without query from db to get the path. The path is set in a config file.
Can someone help me understand why it is happening like this?
Thanks.
Samot