<?php
$src = "02.png";
$info = getimagesize($src);
$type = image_type_to_extension($info[2],false);
$fun = "imagecreatefrom{$type} ";
$image = $fun($src);
$font = "arial.ttf";
$content = "歡迎來到PHP中文網(wǎng)";
$col = imagecolorallocatealpha($image, 255, 255, 255 , 30);
imagettftext($image, 20, 0, 20, 30, $col, $font, $content);
header("content-type:".$info['mime']);
$func = "???{$type}";
$func($image);
$func($image,'FFF.'.$type);
imagedestroy($image);
學習可以不斷提高自己,可以變得更全面、更專業(yè)、更充實。學海無涯,我將一直學下去。
?? ??? ?????. header("Content-type: text/html; charset=utf-8");