最新回答 / qq_看看_1
有两个错误 第一个在function getVerify($fontFile='./fonts/consola.ttf',$width=500,$height=60) 应该给文字指定默认值 第二个错误 imagefilledrectangle() 函数书写错误
2017-07-13
最新回答 / qq_沙漏_14
<?php $filename="images/thumb.jpg"; $fileInfo=getimagesize($filename); $mime=$fileInfo['mime']; $createfrom=str_replace('/','createfrom',$mime); $outFun=str_replace('/',null,$mime); $image=$createfrom($filename); $red=imagecolorallocatealpha($image...
2017-07-10
已采纳回答 / 刘怡然
是不是图片格式不对。你用getimagesize()输出一下看图片格式是什么,和最后header('content-type:image/这里的格式对照');再看看image-后缀($img);我估计你输出的图片格式和header设置的不是一种才会出错。可能 你的图片文件名写的是 **.png 其实输出后 是 **.jpg;
2017-06-10
已采纳回答 / cg肥力士
imagettfbbox()可以得到字体外框宽高。
返回一个含有8个值的数组。值的顺序对应左下右下右上左上四个角的坐标。横坐标减横坐标,纵坐标减纵坐标得出宽高。
2017-04-01