无法显示图像

<?php
Header("Content-type: image/gif");
$fp=fopen("/var/www/html/jsq.txt","r");
$str1=fgets($fp,10);

fclose($fp);

$fp=fopen("/var/www/html/jsq.txt","w");
$str1++;
fputs($fp,$str1);
fclose($fp);
$len1=strlen($str1);
$str2="000000000";
$len2=strlen($str2);
$dif=$len2-$len1;
$rest=substr($str2,0,$dif);
$string=$rest.$str1;
#echo("你是第 $string 个访问者");
$font=4;
$im=imagecreate(120,31);
$background_color=imagecolorallocate($im,0,0,0);
$foreground_color=imagecolorallocate($im,250,250,250);
imagefill($im,0,0,$background_color);
$px=(imagesx($im)-8.3*strlen($string))/2;
imagestring($im,3,$px,2,"My counter",$foreground_color);
imageline($im,1,14,85,14,$foreground_color);
imagestring($im.$font,$px,15.5,$foreground_color);
imagepng($im);
imagedestory($im);

?>
这是按书上写的代码,但是当我在浏览器上打开时,显示
‘图像“http://192.168.0.10”因其本身有错无法显示’
而这几个字是图像,不知是什么原因?