Invisible Images (.gif, .jpeg, .png)
I am using PHP from localhost. The files have extension .php. The content has images and text. However, only the text is displayed when I load them from http://localhost/file.php. A red X marks the location of the image.
If I change the extension from .php to .html and load the same file from file:///C:/inetpub/wwwroot/file.html, the image is visible. But it is not from localhost with .php.
when I change the header to image/gif, I see only the image not the text.
<HTML>
<HEAD>
<TITLE> </TITLE>
<META NAME="GENERATOR" Content="Microsoft Visual Studio">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8">
<style type = "text/css">
p
{
font-weight: bold;
}
body
{
background-image: url("image1.gif"), no-repeat;
background-position: top right;
}
</style>
</head>
<body>
<p>
Images [gif, jpg, png] are not showing up from http://localhost from file with php extension as background or img src.
</p>
<img src="image1.gif" alt = "gif image" border = "1"/>
<br /> <br />
<img src="image001.jpg" alt = "jpg image"/>
<br /> <br />
<img src="image1.png" alt = "png image" border = "2" />
<br /> <br />
<?php
echo "Images not visible!";
?>
</body>
</html>
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled