0

I would like to ask you a simple question. How can I show a picture from a different folder from c:\xampp\htdosc from my local server. Here is more specific information.This code works(I can see the picture.Here the picture is in "C:\xampp\htdocs\") :

<html>
<head>
</head>
<body>
 <img src="124.jpg">
</body>
</html>

but when I try to change it like :

<html>
<head>
</head>
<body>
 <img src="c:/New folder/124.jpg">
</body>
</html>

it doesn't work.I have for a result "broken picture"( a tiny squire with 2 curly lines).In this case as you see the picture is in "C:\New Folder\".

  • Your image src must be relative to the webserver root directory, not a filesystem reference – Mark Baker Sep 25 '14 at 21:59
  • You have to find a way to make xampp read outside your document root. More info here: http://stackoverflow.com/questions/1408/make-xampp-apache-serve-file-outside-of-htdocs – icecub Sep 25 '14 at 21:59
  • So I can't set a reference to a different directory except "C:\xampp\htdocs\" and eventually to its sub directories?Because when I created "C:\xampp\htdocs\New Folder\" and pasted "124.jpg" in it , the code worked normally(The code is : – user3423027 Sep 25 '14 at 22:26

0 Answers0