2017 © Pedro Peláez
 

library termor-captcha

captcha package for thinkphp5

image

xuebutayan/termor-captcha

captcha package for thinkphp5

  • Wednesday, October 19, 2016
  • by xuebutayan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

think-captcha

thinkphp5 验证码类库, (*1)

安装

composer require topthink/think-captcha, (*2)

使用

模板里输出验证码

<div>{:captcha_img()}</div>

或者, (*3)

<div><img src="{:captcha_src()}" alt="captcha" /></div>

上面两种的最终效果是一样的, (*4)

控制器里验证

使用TP5的内置验证功能即可, (*5)

$this->validate($data,[
    'captcha|验证码'=>'require|captcha'
]);

或者手动验证, (*6)

if(!captcha_check($captcha)){
 //验证失败
};

The Versions

19/10 2016

dev-master

9999999-dev

captcha package for thinkphp5

  Sources   Download

Apache-2.0

by Avatar yunwuxin

19/10 2016

1.0

1.0.0.0

captcha package for thinkphp5

  Sources   Download

Apache-2.0

by Avatar yunwuxin