/** * 制作验证图片 * * @return arrya $captcha_all */ public function makeCaptcha() { $captcha_all = array(); // Originating request: $captcha = new Zend_Captcha_Image(array('session' => new Zend_Session_Namespace(), 'wordLen' => 4, 'width' => 155, 'height' => 50, 'timeout' => 300, 'font' => BOOT_PATH . '/others/fonts/MONACO.TTF', 'fontsize' => 24, 'imgDir' => BOOT_PATH . '/public/temp/', 'imgUrl' => PUBLIC_URL . 'temp/')); $captcha_id = $captcha->generate(); $captcha_session = $captcha->getSession(); $captcha_all['captcha_html'] = (string) $captcha->render(); $captcha_all['captcha_id'] = $captcha_id; return $captcha_all; }