Platform : Windows XP pro
Server : IIS
PHP ver : PHP ver 4.3.6 with GD
I am trying to implement Thumbnails in PHP by Michael Bailey into my own code and I can't make a thumbnail. I get the "broken image" image and when I right click on it to view image I keep getting this error :
Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\clickreturn\Thumbs.php:8) in c:\inetpub\wwwroot\clickreturn\Thumbs.php on line 85
The error occurs on the line in Thumbs (Michael's code) that says
header("Content-type: image/jpeg");
It's also followed by garbage that looks like this :
ÿØÿàÿþCREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
plus a bunch of other junk
Michael's code can be found in the link above and my code that calls it looks like this :
printf("<tr>
<td><input type=\"checkbox\" name=\"checkbox".$myrow['MapID'].
"\" value=\"checkbox\"></td>\n
<td><a href=%s?Map=%s&MapID=%s&Lat=%s&Lon=%s>
<img src=\"Thumbs.php?Maps/%s\"border=\"0\"></a></td>\n
<td>%s<center><a href=%s?Map=%s&MapID=%s&Lat=%s&Lon=%s>%s</center></font></td>\n
<td><center>%s%s</center></font></td>\n
<td><center>%s%s</center></font></td>\n
</tr>",
$_SERVER['PHP_SELF'], $KW, $myrow["MapID"], $Lat, $Lon, $myrow["MapFilename"],
$fontset, $_SERVER['PHP_SELF'], $KW, $myrow["MapID"], $Lat, $Lon, $myrow["Keywords"],
$fontset, $myrow["Latitude"],
$fontset, $myrow["Longitude"]);
Thanks in advance for anyone that can help me make thumbnails on the fly