<?php
// 1.
$img=imagecreatetruecolor(400,400);
$white=imagecolorallocate($img, 255, 255, 255);
$gray=imagecolorallocate($img, 0xC0, 0xC0, 0xC0);
$darkgray=imagecolorallocate($img, 0x90, 0x90, 0x90);
$navy=imagecolorallocate($img, 0, 0, 0x80);
$darknavy=imagecolorallocate($img, 0, 0, 0x50);
$red= imagecolorallocate($img, 0xFF, 0, 0);
$darkred=imagecolorallocate($img, 0x90, 0, 0);
// 2.
imagefill($img,0,0,$red);
imagettftext($img,20,-60,60,150,$darknavy,"simhei.ttf","一二三");
// 3.
header("Content-Type:image/gif");
imagegif($img);
// 4.
imagedestroy($img);
"一二三"无法显示,只有几个方框,怎样解决乱码问题?先谢谢!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货