tp生成验证码

mac2022-06-30  19

视图层:

        <input type="text" name="code" value="" />        <img οnclick="this.src='__URL__/code/'+Math.random()" style="cursor:pointer" src="__URL__/code" style="width:20px;height:30px;"/> 控制器层:

     //生成验证码    public function code()    {        //$Verify = new \Think\Verify();        //$Verify->entry();        $Verify =     new \Think\Verify();        $Verify->fontSize = 30;        $Verify->length   = 4;        //$Verify->useNoise = false;        $Verify->entry();    }

转载于:https://www.cnblogs.com/shaohuixia/p/5511864.html

最新回复(0)