请大家帮我看看:)<td colspan="2" align=center>*请在附加码框输入<img src="img.php?text=<? echo $text; ?>&localtime1=<? echo $localtime1; ?>"></td>img.php中:
Header( "Content-type: image/gif");
if(!isset($s)) $s=11; $text=AddCode($text,$localtime1,4);$size = imagettfbbox($s,0, "img/Verdanab.ttf",$text);
//设定长宽
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9; $im = imagecreate($dx+$xpad,$dy+$ypad);
//设定R,G,B
$blue = ImageColorAllocate($im, 255,255,255); $black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 0,0,0);
//画图
//ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
//ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "img/Verdanab.ttf", $text);
//ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "image/Verdanab.ttf", $text);
imagepng($im); ImageDestroy($im);
?>
Header( "Content-type: image/gif");
if(!isset($s)) $s=11; $text=AddCode($text,$localtime1,4);$size = imagettfbbox($s,0, "img/Verdanab.ttf",$text);
//设定长宽
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9; $im = imagecreate($dx+$xpad,$dy+$ypad);
//设定R,G,B
$blue = ImageColorAllocate($im, 255,255,255); $black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 0,0,0);
//画图
//ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
//ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "img/Verdanab.ttf", $text);
//ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "image/Verdanab.ttf", $text);
imagepng($im); ImageDestroy($im);
?>
有什么结果?