php - Display image using absolute path -


i using uploadify upload img server @ time of upload saved absolute path data base like:

/var/www/html/workbench/photogallery/uploads/logo2.jpg

now want display same in browser following method not work

             <div id="photos">     <h3>photo title</h3>     <p class="like"><a href="#">like</a> </p>     <p class="date">date </p>     <p class="pclear" />     <div id="image">         <img src="<?php echo $result_set['path']; ?>" /> 

// doesn't work . when edit path manually uploads/logo2.jpg work image goes here

how can resolve problem?

you need use url, not path.

this:

/var/www/html/workbench/photogallery/uploads/logo2.jpg 

is physical path, address on server image found. need use url available visitors. guess have name mapped server (something localhost or www.example.com).

from structure guess url like

http://www.example.com/photogallery/uploads/logo2.jpg 

where www.example.com base url using application


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -