摘要
在使用微信公众号开发过程中,用户经常需要和服务器进行对话,后台需要知道用户提交信息的上文是什么,在连接状态下,可以通过整个页面的提交,比较容易的得到用户的请求信息并进行相应的处理。在微信公众号的开发模式下,由于服务器收到的用户信息是通过微信服务器转发的,对话时这些上下文信息的处理就需要采取其他手段来保存。文中介绍了一种在非连接模式下用户和服务器进行对话的通用处理方法,通过较为简单的方法实现了上下文信息的保存和处理,并通过php为例进行了实现。
In the development process using WeChat public number, users oftenneed to conduct dialogue with the server, and the server needs to know what the information submitted before. In the connection state, through the en- tire page submission, it is relatively easy to get the user's request information and corresponding treatment. In the development model of WeChat public number, because the user information received by the server is transmitted through the WeChat server, in the dialogue, the processing of these contextual information needs to be saved by other means. This paper introduces a general processing method of dialogue in a non connection mode the user and the server, through a simple method to realize the preservation and processing of context information, and it is realized through the example of PHP.
出处
《西安铁路职业技术学院学报》
2017年第3期32-34,共3页
Journal of Xi’an Railway Vocational & Technical Institute
关键词
微信公众号
会话
PHP
上下文信息保存
WeChat Public Number
Dialogue
PHP
Contextual Information Preservation