Search code examples
phpimageubuntuhtdocs

image can not be seen in htdocs in ubuntu 12.10?


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

Solution

  • 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**