I want to display images stored in the local filesystem in my Windows machine.
file path : D:/farewell/new/imagename.JPG
<html>
<head>
<title>
Images Gallery
</title>
</head>
<body>
<?php
$img="D:/farewell/new/IMG_0603.JPG";
echo "<img src='$img' width=\"300\"/>";
?>
</body>
</html>
The webpage does not load any image, but the Inspect Element shows following error:
Not allowed to load local resource: file:///D:/farewell/new/IMG_0603.JPG images.php:10
How can I allow PHP or Apache webserver or the Chrome browser, whatever the case may be, to allow access to images stored in other partitions?
EDIT :
I want to access all the images present in D:/farewell/new/. I tried setting up an alias for the same under httpd.conf, but that was of no use as url cannot be served to tags.
Alias /farewell/ "D:/farewell/2/"
<Directory "D:/farewell/2">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>