我有Zend形式的图像验证码
$captcha = new Zend_Form_Element_Captcha('captcha', array('captcha' => array(
'captcha' => 'Image',
'label' => 'Rasmdagi belgilarni kiriting',
'required' => true,
'wordLen' => 5,
'width' => 150,
'height' => 40,
'timeout' => 300,
'fontSize' => 32,
'gcFreq' => 5,
'font' => 'files/captcha/fonts/4.ttf',
'imgDir' => 'files/captcha/image',
'imgurl' => '/files/captcha/image',
)));
$captcha->setIgnore(true);
我必须改变它的风格(背景).
解决方法:
我相信你无法改变验证码图像的背景.它被硬编码到Zend_Captcha_Image中.您必须创建自己的验证码图像类,例如My_Captcha_Image通过扩展Zend_Captcha_Image并修改线条/线条图像的设置背景.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。