php中captcha action,CaptchaAction, yii\captcha\CaptchaAction

$backColor 公共 属性

The background color. For example, 0x55FF00.

Defaults to 0xFFFFFF, meaning white color.

$fixedVerifyCode 公共 属性

The fixed verification code. When this property is set,

getVerifyCode() will always return the value of this property.

This is mainly used in automated tests where we want to be able to reproduce

the same verification code each time we run the tests.

If not set, it means the verification code will be randomly generated.

$fontFile 公共 属性

The TrueType font file. This can be either a file path or path alias.

public $fontFile ='@yii/captcha/SpicyRice.ttf'

$foreColor 公共 属性

The font color. For example, 0x55FF00. Defaults to 0x2040A0 (blue color).

$height 公共 属性

The height of the generated CAPTCHA image. Defaults to 50.

$imageLibrary 公共 属性

(自版本 2.0.7 可用)

The rendering library to use. Currently supported only 'gd' and 'imagick'.

If not set, library will be determined automatically.

$maxLength 公共 属性

The maximum length for randomly generated word. Defaults to 7.

$minLength 公共 属性

The minimum length for randomly generated word. Defaults to 6.

$offset 公共 属性

The offset between characters. Defaults to -2. You can adjust this property

in order to decrease or increase the readability of the captcha.

$padding 公共 属性

Padding around the text. Defaults to 2.

$testLimit 公共 属性

How many times should the same CAPTCHA be displayed. Defaults to 3.

A value less than or equal to 0 means the test is unlimited (available since version 1.1.2).

$transparent 公共 属性

Whether to use transparent background. Defaults to false.

$verifyCode 公共 只读 属性

The verification code.

public $regenerate=false )

$width 公共 属性

The width of the generated CAPTCHA image. Defaults to 120.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值