<?phpfor ($i=0;$i<4;$i++)
{
$s.=dechex(rand(1, 15));
}
echo $s;
$im=imagecreatetruecolor(100, 30);
$bg=imagecolorallocate($im, 0, 0, 0);
$te=imagecolorallocate($im, 255, 255, 255);
imagestring($im, rand(1, 6), rand(3, 70), rand(0, 16), $s, $te);
header("Content-type: imag/jpeg");
imagejpeg($im);
?>
谁能告诉我 这个为什么是乱码
{
$s.=dechex(rand(1, 15));
}
echo $s;
$im=imagecreatetruecolor(100, 30);
$bg=imagecolorallocate($im, 0, 0, 0);
$te=imagecolorallocate($im, 255, 255, 255);
imagestring($im, rand(1, 6), rand(3, 70), rand(0, 16), $s, $te);
header("Content-type: imag/jpeg");
imagejpeg($im);
?>
谁能告诉我 这个为什么是乱码
{
$s.=dechex(rand(1, 15));}
//echo $s;
$im=imagecreatetruecolor(100, 30);
$bg=imagecolorallocate($im, 0, 0, 0);
$te=imagecolorallocate($im, 255, 255, 255);
imagestring($im, rand(1, 6), rand(3, 70), rand(0, 16), $s, $te);
header("Content-type: image/jpeg");
imagejpeg($im);
这个我改过了啊
for ($i=0;$i<4;$i++)
{header("Content-type: image/jpeg");这类问题很好解决只要将header注释了就能够看出来Notice: Undefined variable: s in D:\mydir\index.php on line 4
����JFIF��>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), d
只需要在输出签名加一个 ob_clean() 就可以正常数输出了 谢谢各位的帮助