代码如下// Now the meat, we have to build the signature depending on the random holders
$sigwidth = 1; $maxheight=1;
while (list($numl, $line) = each($lines)) {
list($pos_blx, $pos_bly, $pos_brx, $pos_bry, $pos_trx, $pos_try, $pos_tlx, $pos_tly) = imagettfbbox($fontsize, $textangle, $fontfile, $line);
$textwidth = $pos_brx - $pos_blx;
$textheight = $pos_bly - $pos_tly; if ( $textwidth > $sigwidth ) $sigwidth = $textwidth;
if ( $textheight > $maxheight ) $maxheight = $textheight;
}
reset($lines);
$sigwidth = 1; $maxheight=1;
while (list($numl, $line) = each($lines)) {
list($pos_blx, $pos_bly, $pos_brx, $pos_bry, $pos_trx, $pos_try, $pos_tlx, $pos_tly) = imagettfbbox($fontsize, $textangle, $fontfile, $line);
$textwidth = $pos_brx - $pos_blx;
$textheight = $pos_bly - $pos_tly; if ( $textwidth > $sigwidth ) $sigwidth = $textwidth;
if ( $textheight > $maxheight ) $maxheight = $textheight;
}
reset($lines);
请问怎么配置?
phpinfo();
?>来看你的php配置,看看里面有没有gd和truetype等配置上
你可能因为没有 ttf字库的原因你可以在while循环前
echo $fontfile;然后看看你是否有这个font字库文件
这说明$fontfile的路径是对的,可是为什么程序提示找不到或打不开呢?