我照着你的修改了,但是连用户名都显示不了了。
下面是麦田PT的源代码,可以显示英文,但是中文还是乱码
- if (!$_GET['noname'])
- {
- if (isset($_GET['namered']) && $_GET['namered']>=0 && $_GET['namered']<=255)
- $namered = 0 + $_GET['namered'];
- else $namered=255;
- if (isset($_GET['namegreen']) && $_GET['namegreen']>=0 && $_GET['namegreen']<=255)
- $namegreen = 0 + $_GET['namegreen'];
- else $namegreen=255;
- if (isset($_GET['nameblue']) && $_GET['nameblue']>=0 && $_GET['nameblue']<=255)
- $nameblue = 0 + $_GET['nameblue'];
- else $nameblue=255;
- if (isset($_GET['namesize']) && $_GET['namesize']>=1 && $_GET['namesize']<=5)
- $namesize = 0 + $_GET['namesize'];
- else $namesize=10;
- if (isset($_GET['namex']) && $_GET['namex']>=0 && $_GET['namex']<=350)
- $namex = 0 + $_GET['namex'];
- else $namex=10;
- if (isset($_GET['namey']) && $_GET['namey']>=0 && $_GET['namey']<=19)
- $namey = 0 + $_GET['namey'];
- else $namey=14;
- $name_colour = imagecolorallocate($my_img, $namered, $namegreen, $nameblue);
- //imagestring($my_img, $namesize, $namex, $namey, $username, $name_colour);
- //imagettftext($my_img, $namesize, 0, $namex, $namey, $name_colour, "fonts/simhei.ttf", $username);
- $pic=imagecreate(140,20);
- $black=imagecolorallocate($pic,100,100,100);
- $tran=imagecolortransparent($pic,$black);
- $white=imagecolorallocate($pic,255,255,255);
- $font="fonts/simhei.ttf";
- imagettftext($pic,10,0,10,14,$white,$font,$username);
- imagecopymerge($my_img,$pic,0,0,0,0,140,20,80);
- }
复制代码
|