中国Linux公社论坛 » 网站开发技术与项目孵化 » php下如何绘图
注册会员
查看个人网站
查看详细资料
TOP
公社版主
专砍ID
超级版主v2
到此一游
例子 1. 用 PHP 创建 PNG 图像 [code:1] <?php header("Content-type: image/png"); $string = $_GET['text']; $im = imagecreatefrompng("images/button1.png"); $orange = imagecolorallocate($im, 220, 210, 60); $px = (imagesx($im) - 7.5 * strlen($string)) / 2; imagestring($im, 3, $px, 9, $string, $orange); imagepng($im); imagedestroy($im); ?> [/code:1]