captcha.php 1.1 KB

1234567891011121314151617181920212223242526
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | 验证码配置
  13. // +----------------------------------------------------------------------
  14. return [
  15. 'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY', //字符码集合
  16. 'useCurve' => false, // 是否画混淆曲线
  17. 'length' => 4, // 验证码位数
  18. 'expire' => 1800, //验证码过期时间(s)
  19. 'useZh' => false, // 使用中文验证码
  20. 'useImgBg' => false, // 使用背景图片
  21. 'fontSize' => 25, //字体大小
  22. 'bg' => [243, 251, 254],
  23. 'math' => false,
  24. ];