wjx_sdau
新手上路

UID 117675
精华
0
积分 31
帖子 17
金钱 31 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2008-4-4
状态 离线
|
能不能在生成图形文件的php中添加汉字说明呢?
假如有下面的代码:
<?php
header("Content-type: image/png");
$imgWidth=250;
$imgHeight=250;
$image=imagecreate($imgWidth, $imgHeight);
$colorWhite=imagecolorallocate($image, 255, 255, 255);
$colorGrey=imagecolorallocate($image, 192, 192, 192);
imageline($image, 0, 0, 0, 250, $colorGrey);
imageline($image, 0, 249, 249, 249, $colorGrey);
imagepng($image);
imagedestroy($image);
?>
生成一个坐标图,我想在坐标图的下面加上一句说明,于是我将上面的代码修改为:
<?php
header("Content-type: image/png");
$imgWidth=250;
$imgHeight=250;
$image=imagecreate($imgWidth, $imgHeight);
$colorWhite=imagecolorallocate($image, 255, 255, 255);
$colorGrey=imagecolorallocate($image, 192, 192, 192);
imageline($image, 0, 0, 0, 250, $colorGrey);
imageline($image, 0, 249, 249, 249, $colorGrey);
echo"这是坐标!";
imagepng($image);
imagedestroy($image);
?>
但运行完后,发现变成了乱码??
有哪位能帮忙解决一下,,谢谢......
|
|