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. Quote Link to comment 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... Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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"? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.