コード例 #1
0
 public function captcha2_check()
 {
     $path = BASEPATH . '../resources/captcha/' . (date('Y') . '/' . date('m') . '/' . date('d'));
     if (!file_exists($path)) {
         mkdir($path, 0777, TRUE);
     }
     $session = new Zend\Session\Container('ZEND_PARANGARI');
     $obj = new Zend\Captcha\Image();
     $obj->setSession($session);
     echo $obj->getWord() == 'h4c984' ? 'VALID' : 'INVALID';
     echo "<br/>";
     $v = $session->offsetGet('text1');
     var_dump($v);
 }