Php uses memcahe for caching. The written interface cannot use the session. Save the verification code to the SMS verification code

Source: Internet
Author: User
Php uses memcahe for caching. The written interface cannot use the session. How to use memcahe to cache the verification code stored in php during text message verification code execution. The written interface cannot use the session. When you do the text message verification code, save the verification code to memcahe, and then retrieve the verification code in memcahe for verification. Tips


Reply to discussion (solution)

Here is a detailed Memcache basic tutorial

/* Oo api */$ memcache_obj = new Memcache;/* connect to memcached server */$ memcache_obj-> connect ('memcache _ host', 11211 ); /* set the value of 'Var _ key' and use instant compression to expire in 50 seconds */$ memcache_obj-> set ('Var _ key', 'some really big variable ', MEMCACHE_COMPRESSED, 50); echo $ memcache_obj-> get ('Var _ key ');


Http://blog.csdn.net/fdipzone/article/details/7166514

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.