一直提示这个错误是啥原因跟啊 warning: imagettftext(): Invalid font filename in,
$sess_name="verify";
$_SESSION[$sess_name]=$chars;
$fontfiles=array("SIMYOU.TTF");
for($i=0;$i<$length;$i++){
$size=mt_rand(14,18);
$angle=mt_rand(-15, 15);//角度
$x=5+$i*$size;
$y=mt_rand(20,26);
//putenv('GDFONTPATH=' . realpath('.'));
//$font = 'SomeFont';
$fontfile='../fonts/';
$color=imagecolorallocate($image,mt_rand(50,90),mt_rand(80,200),mt_rand(90,180));
$text=substr($chars, $i,1);
imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $text);
}
header("content-type:image/gif");
//ob_clean();
imagegif($image);
imagedestroy($image);