Question

I am using Ubuntu 12.10 and recently have installed xampp 1.8.1. My problem is: images from server can not be shown which is look like as the following image : image not shown

look here is in my address bar I use localhost/madeTemplet/basicTemplet/templet03.html and I want to show image after Unsung heroes text but it only shown some link and not any image.

I use the following code for image ::

<div class="sideBlock unSung">
   <h4>Unsung heroes...</h4>
<a href="#"> <img src="_images/1_full.jpg" alt="Midnight Run" width="99" height="135" /> </a>

<a href="#"><img src="_images/2d7y3ki.jpg" alt="Wyatt Earp" width="99" height="135" /></a>
</div>

But when I use the following :

image is shown

look here is in my address bar I use file:///opt/lampp/htdocs/madeTemplet/basicTemplet/templet03.html and images are shown after Unsung heroes text.

After checking the permissions to access the directory where images are, I get this text in my terminal window ::

  sabbir@sabbir-pc:/opt/lampp/htdocs/madeTemplet/basicTemplet/_images$ ls -l
  total 300
 -rw------- 1 sabbir sabbir 204067 Feb 24  2010 1_full.jpg
 -rw------- 1 sabbir sabbir  75789 Nov 13  2009 2d7y3ki.jpg
 -rw------- 1 sabbir sabbir  23692 Apr 21  2010 6AB32AE44600435B9DE0FB5EBA24A912.gif
Was it helpful?

Solution 2

Seems like you don't have permission to change information. So you have to change permission of that folder. you can do as shown below::

1) **cd **

2) **cd /opt/lampp/htdocs**

3) **chmod 777 * -R** 

OTHER TIPS

You are probably using file:/// paths to address the images inside the HTML page. Don't do that; use the same protocol and host name you are using to serve the page, ie. http://localhost.

Access to local (file://) paths is usually restricted inside the browser for security reasons.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top