Hi,

I am trying to display images in an html page using a
php script.  
The output on the screen is bizarre :)

This code works on its own:
<?
$pic = "flower.jpg"
echo file_get_contents ($pic);
?>

the above actually displays the image flower.jpg
without a problem.

But when I include the same script  in an html page
the screen is filled with all sorts of characters

Something like this:
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/jpg;
charset=windows-1252">
</HEAD>
<BODY>

<?
$pic = "flower.jpg"
echo file_get_contents ($pic);
?>

</BODY>
</HTML>

Have tried another charset e.g.  "charset=utf-8" 
instead of "charset=windows-1252", 
but to no avail.

What is the problem?  Is there a way of getting the
image to work via php  *inside* an html document?

Would greatly appreciate your help!

David


      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  
http://uk.promotions.yahoo.com/forgood/environment.html

Reply via email to