(on Saturday, 21 March 2009, 01:26 PM -0700):
> Thanks for your response. Unfortunately, neither 'captcha' => $captchaimage
> nor 'captcha' => 'My_Captcha_Image' works. You seem to be on the right
> track, but I get an exception:
>
> Warning: Exception caught by form: Image CAPTCHA requires font Stack Trace:
This is telling you exactly the problem -- you either didn't specify the
font to use, or specified an invalid path. Looking further...
<snip>
> 'font' => 'pics/captcha/DeJaVuSansMono.ttf',
... the problem is you are using a relative path to the font... but
you're not saying where it's relative _to_. Specify a full path to the
font, based on some known path (document root, APPLICATION_PATH constant
if you've set it, dirname(__FILE__) from the file where you create the
form, whatever), and you should be fine.
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论