Jump to content

Can't get an image to echo....


suttercain

Recommended Posts

Hi guys,

 

I am trying to get a simple gif to echo out to the browser. When I run:

echo "<img src=\"http://localhost/ARB/checked.gif\"/>";

 

or

 

echo "<img src=\"checked.gif\"/>";

 

I just get the code printed to the browser. Any ideas?

 

Thanks

Link to comment
Share on other sites

I'd try it in a different browser, (try refreshing the page first, though you've probably done that 30 times)

 

Also, try putting it into a variable first just to see what happens... i.e.

 

$echoiticommandyou = "<img src=\"checked.gif\"/>";

echo $echoiticommandyou;

Link to comment
Share on other sites

Hi guys,

 

Okay I just tried running this code:

 

<?php

echo '<img src="checked.gif">';

echo '<img src="http://localhost/ARB/checked.gif">';

?>

 

and it printed <img src="checked.gif"><img src="http://localhost/ARB/checked.gif"> to the browser. When I try to view the image by typing in http://localhost/ARB/checked.gif and the image showed up.

 

Any ideas?

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.