Home > Backend Development > PHP Tutorial > Use verification code to verify in tp

Use verification code to verify in tp

WBOY
Release: 2016-07-29 08:59:06
Original
1192 people have browsed it

? & Lt;? Php

namepace adminController;

Use ThinkController;

Use ThinkVerify;

Class Logincontroller Extends Controller ogin () {(if (! Empty ($ _ post)) {

$ $ vry = new Verfiy (); Public function verfiyImage(){

                                                                                                            'imageH' => 45, //Verification code image height

                                                                                                                     100, //Verification code image width

                                                                                                                                         gt;4, //The length of the verification code

'fontttf' => '2.ttf', //Verification code font

} }

//Instantiate the verify class

                               //Output verification code

$ Very -& gt; entry (); // Output verification code}

& ltml page & lt; img src = "{$ Smarty.const ._____}/verfiyImage/'+ Math.rondom()">

The above introduces the use of verification code verification in tp, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template