VerifyCode
class VerifyCode
验证码扩展类 用于生成验证码
Methods
static
void
numVerify(
int $length = 4,
string $type = 'png',
int $width = 150,
int $height = 35,
string $verifyName = 'verifyCode',
string $font = 'tahoma.ttf')
生成图像数字验证码
static
void
CnVerify(
int $length = 4,
string $type = 'png',
int $width = 180,
int $height = 50,
string $font = 'tahoma.ttf',
string $verifyName = 'verifyCode')
中文验证码
static
void
calocVerify(
string $type = 'png',
int $width = 170,
int $height = 45,
string $font = 'tahoma.ttf',
string $verifyName = 'verifyCode')
生成数字计算题验证码
static
bool
checkCode(
string $input,
bool $isCn = false,
string $verifyName = 'verifyCode')
校验验证码
static
void
output(
resource $image,
string $type = 'png',
string $filename = null,
int $quality = 100)
输出图片
Details
at line line 33
static
void
numVerify(
int $length = 4,
string $type = 'png',
int $width = 150,
int $height = 35,
string $verifyName = 'verifyCode',
string $font = 'tahoma.ttf')
生成图像数字验证码
at line line 83
static
void
CnVerify(
int $length = 4,
string $type = 'png',
int $width = 180,
int $height = 50,
string $font = 'tahoma.ttf',
string $verifyName = 'verifyCode')
中文验证码
at line line 126
static
void
calocVerify(
string $type = 'png',
int $width = 170,
int $height = 45,
string $font = 'tahoma.ttf',
string $verifyName = 'verifyCode')
生成数字计算题验证码
at line line 214
static
bool
checkCode(
string $input,
bool $isCn = false,
string $verifyName = 'verifyCode')
校验验证码
at line line 238
static
void
output(
resource $image,
string $type = 'png',
string $filename = null,
int $quality = 100)
输出图片