【发布时间】:2013-07-03 19:58:36
【问题描述】:
我正在使用 Zend_Form_Element_Captcha 创建 Captcha 图像,如下所示:-
$captcha = new Zend_Form_Element_Captcha(
'captcha',
array(
'label' => 'Please write the characters you see in the image:',
'captcha' => array(
'captcha' => 'Image',
'wordLen' => 6,
'timeout' => 900,
'font' => '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf',
)
)
);
$form = new Zend_Form();
$form->addElement($captcha);
这是在创建验证码图像,但方式不正确。 字母完全不可读。 这就是我得到的......
我也尝试更改字体,但结果相同。有什么建议吗?
【问题讨论】:
-
你试过用其他字体吗?
-
是的,正如我所说,我的结局是一样的。我也只尝试了'font'=>'arial',但同样的结果。
-
您确定它正在访问您分配的字体目录吗?
-
不,我该如何检查? (但它也没有显示任何错误)
标签: php zend-framework captcha