Jump to content

[SOLVED] img tag in php file


thosecars82

Recommended Posts

Hello there

I am writing to ask you a really simple thing. It has to do with the img tag. I have been using php+mysql+apache so far. However, I do not know why when I use the img tag in the code below, I cannot see any image at all on my browser. What I see instead is the alt name which is "wewe" in this particular case according to the code below.

 

file.php

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>

</head>

<body>

<img src="estilos/images/spanishflag.gif" alt="wewe" />

</body>

</html>

 

 

On the other hand if I rename this file so that it is file.html instead of file.php, then browsing the file file.html will let me see the image.

So for me it is quite weird: I just can see the image when the extension of the file is html because if it is .php then I just see the name specified in the alt parameter of img.

Since I have been stuck with this stupid thing for a while, my brain is quite tired right now. Moreover, there might be an easy answer to my doubt which I have not found yet. Anyways, I would appreciate your suggestions since I am stuck with this.

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/105798-solved-img-tag-in-php-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.