那錯了,求解
<?php
$src="im.gif";//連接數據庫
$info=getimagesize($src);//獲得圖片信息
$type=image_type_to_extension($info[2],false);
$fun="imagecreateform{$type}";
$image=$fun($src);
//把圖片復制到內存中
$font="msyhbd.ttc";
//設置字體路徑
$content="你好,哈哈";
//加入的內容
$col=imagecolorexactalpha($image,255,255,255,50);
//用此函數設置字體的顏色和透明度
imagefttext($image,20,0,20,30,$col,$font,$content);
//把函數寫到圖片中
header("Content-type:".$info['mime']);
//告訴瀏覽器怎樣輸出
$func="image{$type}";
//類型
$func($image);
//輸出
?>
2016-06-01
//加入的內容
$col=imagecolorexactalpha($image,255,255,255,50);
應該是
$col = imagecolorallocatealpha($image, 255, 255, 255, 50);