Tjorriemorrie Posted September 25, 2008 Share Posted September 25, 2008 Hey, as the title says, my images doesn't show in the browser. I'm saving the absolute path of the images in my database (using absolute as I'm testing locally using wamp). When i put those paths in an img tag, the image doesn't show. IE doesn't show the red 'broken link' cross, but the image placeholder icon, so I'm not sure why it just doesn't show the picture. Here is the code: <?php echo "<p>Name: " . $left["picpath"] . "</p>\r\n"; echo "<p>Size: " . $left["picsize"] . "</p>\r\n"; echo "<p><img src=\"" . $left["picpath"] . "\" /></p>\r\n"; print_r($left); ?> Here is its page source: <p>Name: F:\pictures other\art\22903721.jpg</p> <p>Size: 97812</p> <p><img src="F:\pictures other\art\22903721.jpg" /></p> Array ( [id] => 1518 [picpath] => F:\pictures other\art\22903721.jpg [picsize] => 97812 [picstats] => [lastupdate] => 0000-00-00 00:00:00 ) Any help appreciated! Link to comment https://forums.phpfreaks.com/topic/125831-images-not-showing/ Share on other sites More sharing options...
discomatt Posted September 25, 2008 Share Posted September 25, 2008 You NEED a protocol... try "file://{$left['picpath']}" Link to comment https://forums.phpfreaks.com/topic/125831-images-not-showing/#findComment-650656 Share on other sites More sharing options...
Tjorriemorrie Posted September 25, 2008 Author Share Posted September 25, 2008 You NEED a protocol... try "file://{$left['picpath']}" Sorry, can you please explain that to me a bit more, I'm still stuck Link to comment https://forums.phpfreaks.com/topic/125831-images-not-showing/#findComment-650796 Share on other sites More sharing options...
discomatt Posted September 26, 2008 Share Posted September 26, 2008 <img src="file://c:\path\to\your\image" alt="Improper, but works" /> <img src="file:///c:/path/to/your/image" alt="Standards" /> Link to comment https://forums.phpfreaks.com/topic/125831-images-not-showing/#findComment-650900 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.