We know that the request initiated by the WeChat applet is sent to our server through Tencent's server, and the session is generally identified by the sessionid in the client cookie. Since the request must go through Tencent's The server sends it to our server, then our server has no way of identifying the initiator of the request.
The request initiated by the WeChat applet cannot use session solution:
1 Identify the initiator of the request by rewriting the URL
2 We use the file cache method To replace session
The above is the detailed content of The solution to the problem that requests initiated by WeChat applet cannot use session. For more information, please follow other related articles on the PHP Chinese website!