A simple implementation method of thinkPHP3.1 verification code, thinkphp3.1 Verification Code
In this paper, a simple implementation method of thinkPHP3.1 verification code is described. Share to everyone for your reference, as follows:
Write in code:
Public Function Verify () { import (' ORG. Util.image '); Ob_clean (); Image::buildimageverify ();}
Write in HTML:
This means that the path to the image is the access path of the PHP code above, OK
If the picture is not displayed, it is Ob_clean (); no write, this method is to remove the cache and the like
If it is garbled is to directly write the above PHP code in front of the display method, remember, this method is separate, do not mix with other methods
More interested in thinkphp related content readers can view this site topic: "thinkphp Introductory Tutorial", "thinkphp Common Methods Summary", "Smarty Template Primer Basic Tutorial" and "PHP template technology Summary."
It is hoped that this article is helpful to the PHP program design based on thinkphp framework.
http://www.bkjia.com/PHPjc/1122888.html www.bkjia.com true http://www.bkjia.com/PHPjc/1122888.html techarticle A simple implementation method of thinkPHP3.1 verification code, thinkphp3.1 Verification Code This paper describes a simple implementation of thinkPHP3.1 verification code. Share to everyone for reference, as follows: ...