We are discussing 3 different files here.
The first one is listed in the first posting and is named file.php.
The second one is identical to the first file but is name file.html.
I wanted to check if the problem was with the image, the browser, or the server localhost.
So far, only localhost cannot display the images.
To further isolate the possible causes, I use a 3rd file with the header image/gif. Only then does localhost display the images.
The bottom line using localhost, I can have either text or images but not both. I want both naturally together.
If you look again, you will see that within the html/php file I have the img tag for .gif, .jpg, .png.
The image file is an ordinary gif picture. Anyway, I enclosed within an include and php tag, but nada except X.
Take a look at these:
body
{ background-image: url("image1.gif"), no-repeat;
background-position: top right;
}
<img src=" <?php
include('image1.gif');
?>
" />
<img src=" <?php
$fn=fopen("image1.gif","r");
fpassthru($fn);
?>
" />
<img src="/image001.gif" alt = "gif image 001" border = "1"/>
<br /> <br />
<img src="image001.jpg" alt = "jpg image"/>
<br /> <br />
<img src="image1.png" alt = "png image" border = "2" />
------------------------------------------ Output from localhost ------------------------------------
X X
Images [gif, jpg, png] are not showing up from http://localhost from file with php extension as background or img src.
X gif
X jpg
X png