选择语言 :

 Core_Captcha::generate_challenge

Generates a new captcha challenge.

string Core_Captcha::generate_challenge( )
返回值
  • string the challenge answer
File: ./core/classes/captcha.class.php
protected static function generate_challenge()
{
    // Complexity setting is used as character count
    Captcha::$response = Captcha::random(max(1, Captcha::$config['complexity']));
    Session::instance()->set(Captcha::$sessionname, array('code' => Captcha::$response, 'time' => TIME));
}