Home >WeChat Applet >Mini Program Development >The solution to the problem that requests initiated by WeChat applet cannot use session

The solution to the problem that requests initiated by WeChat applet cannot use session

PHPz
PHPzOriginal
2017-04-03 17:49:553090browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn