當前位置:編程學習大全網 - 網站源碼 - 請幫看壹下PHP源代碼,要怎麽弄才能實現輸出的文字換成紅色

請幫看壹下PHP源代碼,要怎麽弄才能實現輸出的文字換成紅色

<?php

error_reporting(0);?

header("content-type:image/jpeg");

mb_internal_encoding("UTF-8");

$name?=?$_GET['name']?$_GET['name']:"H";

$namea?=?$_GET['namea']?$_GET['namea']:"b";

$im?=?imagecreatetruecolor(640,?474);

$bg?=?imagecreatefromjpeg('b.jpg');

imagecopy($im,$bg,0,0,0,0,640,474);

imagedestroy($bg);

$black?=?imagecolorallocate($im,?30,?30,?30);

$red?=?imagecolorallocate($im,?255,?0,?0);

$text?=?$name;

$font?=?'../font/xjl.ttf';

imagettftext($im,?15,?0,?180,?270,?$black,?$font,?$text);

$font?=?'../font/xjl.ttf';

$len?=?mb_strlen($namea,"UTF-8");

$left_x?=?(640-$len*40)/2;

imagettftext($im,?30,?0,?$left_x,?330,?$red,?$font,?$namea);

$showtime=date("Y年-m月-d日");

$font?=?'../font/xjl.ttf';

imagettftext($im,?10,?0,?380,?400,?$black,?$font,?$showtime);

imagejpeg($im);

imagedestroy($im);

>

  • 上一篇:Trojan.PWS.QQPass
  • 下一篇:嗶哩嗶哩壹鍵登錄有幾率彈出來嗎?
  • copyright 2024編程學習大全網