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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.