This article summarizes some quick steps taken to facilitate development when developing WeChat interfaces, which has saved developers difficult development time and improved development efficiency.
(Reminder, comment out the verification parameters when simulating WeChat get or post data locally)
Use WeChat simulator weixinPost to simulate sending xml Data
Since this software was released when WeChat did not disclose the high-level interface, so for the debugging of the high-level interface, the author used Fiddler, a packet capture tool, to simulate the post data
Use the reverse proxy software ngrok to access local projects:
ngrok is a reverse proxy that establishes a ## between a public endpoint and a locally running Web server. #Secure channel. (Wikipedia and Baidu Encyclopedia have no explanation for this software yet)
The author uses windows as an example to explain: 1. Software download address: ngrok. com/download2. Register an account on the website to obtain authtokenAfter successful registration, below: The author placed the downloaded ngrok on the d drive Next, enter the cmd command into ngrokThe following interface will appear, indicating that the authtoken setting is successful. Press CTRL+C to return: Next, enter the following command line to set the domain name prefix mynawechat: After the setting is successful, the display is as follows The test in the project is as follows:The test is successful! ! ! In this way, you can directly access the local project when developing 【Related recommendations】1.WeChat public account platform source code download
2.Alizi order system source code
The above is the detailed content of WeChat development can debug the interface locally. For more information, please follow other related articles on the PHP Chinese website!