Jump to content
Larry Ullman's Book Forums

Images Don'T Show Up - Exercise 2


Recommended Posts

Hello

Everything is set up and working on Exercise 2 except the images won't show up - it either shows a red cross/x-mark or won't show up at all. I have all the images/logos in the right place and directory so not sure why this is happening. This is for both Firefox and IE8. Could you help? Thanks

sjk

Link to comment
Share on other sites

Well the red cross means the image cannot be found at that URL - right click the image (red cross) and select open image in tab (or similar) and see exactly what URL is being requested. This will let you figure out whether its the PHP generating the URL that's incorrect or the file structure thats wrong.

  • Upvote 1
Link to comment
Share on other sites

I would probably guess that they aren't in the right place or are referenced wrongly. It's hard without knowing your folder/file set up obviously. My advice is to view the source code of the page, where there is a broken image (if its referenced through the html and not the CSS), find the tags its contained within such as

<img src="../somefolder/domeimage.jpg" />

and click the link, it will probably through an object not found error, but the full path of the referenced file will be in the browser's title. There you might see that you've referenced it wrongly. Alternatively use the abolute URL if your not already. At least it should then work,

something like:

http://localhost/my_folder/images/image_10.jpg

 

Let me know how you get on

 

Jonathon

Link to comment
Share on other sites

Yay! Thank you Jonathan and Stuart - It took me a while to find out which files the corrections had to be made, but the images now show up!

ps - for those who are are having the same problem, corrections need to be made in the home.html and list_categories.html files (under Views Folder)

 

Thanks again!

Link to comment
Share on other sites

 Share

×
×
  • Create New...