php中linux怎么不能用imagettftext这个函数?
header("Content-type:image/png"); $filename="./temp.txt"; $myfi...
header("Content-type: image/png"); $filename = "./temp.txt"; $myfile = fopen($filename,"r"); $i=0; while(!feof($myfile)) {fgets($myfile,255);$i++;} fclose($myfile); $im = imagecreate(1024,$i*25); $text_back_color = imagecolorallocate($im,255,0,255); $text_color = imagecolorallocate($im,0,0,0); imagefilledrectangle($im,0,0,1024,768,$text_back_color); $k = 20; $myfile = fopen($filename,"r"); while(!feof($myfile)) { $text_string = fgets($myfile,255); imagettftext($im,15,0,5,$k,$text_color,"include/Vera.ttf",iconv("utf-8","gb2312",$text_string)); $k += 25; } fclose($myfile); imagepng($im); imagedestroy($im); 在linux上提示:Fatal error</b>: Call to undefined function imagettftext()而在windows上可以显示图片,且linux上有GD,其他的GD函数能用,把这个函数注释掉就可以显示一张有颜色的画布...
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询