最新回答 / 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