php怎樣支持創建漢字的圖片。 把php\dlls目录下的内容复制到系统目录下 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to: xuzuning(唠叨) ( ) 信誉:477 那個問題解決了, 但是還是不出來, 圖象顯示亂嗎。我用的是繁體 http://xinghe.sowee.com/img.php<?phpheader ("Content-type: image/png; charset=big5");$im = @imagecreate (100, 300) or die ("Cannot Initialize new GD image stream");$background_color = imagecolorallocate ($im, 255, 255, 255);$text_color = imagecolorallocate ($im, 233, 14, 91);print("³o¸Ì¿é¥XÁcÅéº~¦r");imagestring ($im, 1, 5, 5, "³o¸Ì¿é¥XÁcÅéº~¦r", $text_color);print("This print english");imagestring ($im, 1, 5, 5, "This print english", $text_color);imagepng ($im);?> <?phpheader ("Content-type: image/png; charset=big5");$im = @imagecreate (100, 300) or die ("Cannot Initialize new GD image stream");$background_color = imagecolorallocate ($im, 255, 255, 255);$text_color = imagecolorallocate ($im, 233, 14, 91);print("這裡輸出繁體漢字");imagestring ($im, 1, 5, 5, "這裡輸出繁體漢字", $text_color);print("This print english");imagestring ($im, 1, 5, 5, "This print english", $text_color);imagepng ($im);?> http://linuxsoft.myrice.com/linuxclub/linuxbc/gd.htm http://expert.csdn.net/Expert/topic/2063/2063514.xml?temp=.8493006不使用iconv()http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=97062使用iconv()Header("Content-type: image/PNG"); $im = imagecreate(300,50); $bkg = ImageColorAllocate($im, 128,64,225); $clr = ImageColorAllocate($im, 255,255,255); $fnt = "c:/windows/fonts/simfang.ttf";$str = iconv("GB2312","UTF-8","欢迎光临"); ImageTTFText($im, 20, 0, 30,40, $clr, $fnt, $str); ImagePNG($im); ImageDestroy($im); PHP 调用新浪滚动新闻 mysql直接执行sql和php中用mysql_query()取得的数据不一样 php iconv('UTF-8','GB2312',$str)函数问题 获取<img src=''>的时候,有timeout时间的限制吗? 有关cookie的问题请教 如何让自动刷新的时候不提交上一次的连接地址? 用过phplib里template类的朋友请进 phpMyadmin的为什么不能显示中文? php链接mysql数据库报错,PDO错误,php could not find driver php中如何在json中带入php变量 页面间的变量传递 (简单) 初学问题(三)
但是還是不出來, 圖象顯示亂嗎。
我用的是繁體
header ("Content-type: image/png; charset=big5");
$im = @imagecreate (100, 300)
or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 233, 14, 91);
print("³o¸Ì¿é¥XÁcÅéº~¦r");
imagestring ($im, 1, 5, 5, "³o¸Ì¿é¥XÁcÅéº~¦r", $text_color);
print("This print english");
imagestring ($im, 1, 5, 5, "This print english", $text_color);
imagepng ($im);
?>
header ("Content-type: image/png; charset=big5");
$im = @imagecreate (100, 300)
or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 233, 14, 91);
print("這裡輸出繁體漢字");
imagestring ($im, 1, 5, 5, "這裡輸出繁體漢字", $text_color);
print("This print english");
imagestring ($im, 1, 5, 5, "This print english", $text_color);
imagepng ($im);
?>
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=97062使用iconv()
Header("Content-type: image/PNG");
$im = imagecreate(300,50);
$bkg = ImageColorAllocate($im, 128,64,225);
$clr = ImageColorAllocate($im, 255,255,255);
$fnt = "c:/windows/fonts/simfang.ttf";$str = iconv("GB2312","UTF-8","欢迎光临"); ImageTTFText($im, 20, 0, 30,40, $clr, $fnt, $str);
ImagePNG($im);
ImageDestroy($im);