I thought that displaying image in PHP was easy; but i am having a lot of problem simply displaying a gif file.
The code is here:
<html>
<head>
</head>
<body>
<?php
$img = "C:\Inetpub\wwwroot\gps1\mumbai.gif";
$im = imagecreatefromgif ($img);
header( 'Content-type: image/gif' );
imagegif($im);
?>
</body>
</html>
I don't know what is the problem.
I have saved the text file in ANSI format.
Also, I have tried various changes in php.ini file but the error that headers already sent out was only solved when output_buffer was ON.
Also, the php_gd2.dll extension is enabled.
In the IE 6 , i get the whole image as garbled like
GIF87SASDFSAF.......
Something like this.
I have tried in other browsers like netscape and Firefox.
Also, please note I am using IIS 5 server.
Please can any one help.


