As my PHP website has more and more visits to blog development and more comments, Wordpress has more and more visits to blog development and comments as Wordpress does not have the filtering function, wordpress spam comments are getting more and
1, installation
We install the Captcha expansion pack via Composer:
Composer require Mews/captcha
Note: Using this expansion pack in Windows also requires the installation of the GD2 extension (php.ini to cancel Php_gd2.dll in the previous
PHP development framework YiiFramework tutorial (20) UI component Captcha example
Captcha (a Completely Automated Turing test that distinguishes Computers from Humans-Completely automation Public Turing test to tell Computers and Humans Apart,
Topics
Many automatedProgramThe form is automatically submitted, causing a large amount of junk data on the Internet. To prevent this situation, we have implemented a graphic Verification Code (CAPTCHA:Completely automated public Turing test to
In PHP to generate verification code picture is quite simple, because in PHP provides us with the graphics Gd.dll Library, to enable the GD graphics library we just put PHP-GD in front of the php.ini;
Method One
The code is as follows
Recently encountered a problem, is that the verification code on someone else's computer can be displayed, but my own computer up can't. Reason for a long time, haha, finally found! Now let's share:Program:$w = 80; Set picture width and height$h = 26
Problem:Fatal error:call to undefined function think\imagettftext () in/var/www/webreg/thinkphp/library/think/ Verify.class.php on line 143See Phpinfo () and learned that GD does not have freetype supportSolve:First install freestyle,php-gd Ensure
Recently encountered a problem, is that the verification code on someone else's computer can be displayed, but my own computer up can't. Reason for a long time, haha, finally found! Now let's share:Program: $w = 80; Set picture width and height$h = 2
This article mainly introduces the operations related to cookie and session functions in PHP Yii Framework. For more information, see
Sessions
Similar to requests and responses, you can access sessions by default by using the Session application
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.