pneudralics Posted April 23, 2009 Share Posted April 23, 2009 I have a while loop that grabs image names from the database then displays it in: <img src=\"$websiteurl/icons/$category/$image\" alt=\"\" /> I have different categories for the different images and all of the categories have the same php code but with different table names. I have 3 pages in total. The first 2 pages displays the image fine, but for some reason the 3rd page does not display any of the images. All are duplicates except for the table name in mysql. With wampserver on I can go and type in http://localhost/images/1.jpg it'll show the image for the 1st and 2nd php page, but not for the 3rd php page even though it's a duplicate page of the 1st and 2nd. I can physically see that the image is in the directory, but it won't display for some reason. Link to comment https://forums.phpfreaks.com/topic/155395-anyone-having-issues-displaying-images-with-wampserver/ Share on other sites More sharing options...
mattal999 Posted April 23, 2009 Share Posted April 23, 2009 Do you have read permissions on the image? I know its a stupid question, but I can't think of any other answer... Link to comment https://forums.phpfreaks.com/topic/155395-anyone-having-issues-displaying-images-with-wampserver/#findComment-817643 Share on other sites More sharing options...
GingerRobot Posted April 23, 2009 Share Posted April 23, 2009 Have you doubled checked the html source that's output by the above lines? Link to comment https://forums.phpfreaks.com/topic/155395-anyone-having-issues-displaying-images-with-wampserver/#findComment-817645 Share on other sites More sharing options...
pneudralics Posted April 23, 2009 Author Share Posted April 23, 2009 Yes the html outputs the image source. I've spent several hours looking at this and can't really figure out what is the issue. All of the php pages are duplicates except for the table name and for some reason this one doesn't display. When I create the directory I set it to 777 with mkdir(). All the other images for are uploaded the same exact way. When I type this in the url section it'll show but if I did that to my php code to display it like that it will not show: C:\wamp\www\image\category\e949357865835300e4933beb58b5dbc0.gif The source code shows exactly as I want it to look like above. But if I do this with wampserver on: http://localhost/image/category/e949357865835300e4933beb58b5dbc0.gif it doesnt show in either Link to comment https://forums.phpfreaks.com/topic/155395-anyone-having-issues-displaying-images-with-wampserver/#findComment-817657 Share on other sites More sharing options...
pneudralics Posted April 23, 2009 Author Share Posted April 23, 2009 If I physically go to dreamweaver and insert in the image from the image menu it will not show in that directory, but if I do it to a different directory it'll show? Link to comment https://forums.phpfreaks.com/topic/155395-anyone-having-issues-displaying-images-with-wampserver/#findComment-817672 Share on other sites More sharing options...
PFMaBiSmAd Posted April 23, 2009 Share Posted April 23, 2009 Yes but is the image source correct? The line of code you posted in the 1st post uses "icons" in the path. Everything after that uses "images". What is the actual code and the actual URL in the "view source"? Link to comment https://forums.phpfreaks.com/topic/155395-anyone-having-issues-displaying-images-with-wampserver/#findComment-817674 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.