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