在thinkphp中使用验证码很容易,只要调用thinkphp现有的方法就可以。当然,php的GD库肯定是要开的。
首先,在写Action文件,如:IndexAction.class.php.
thinkphp中验证码的使用_thinkphp verify 验证码
 
 在对应的模板文件:Tpl\default\index目录下新建文件verifyTest.html,内容如下:
thinkphp中验证码的使用_thinkphp verify 验证码_02