微信开发最近要用到的一个功能,其实就是一个非常的简单的用户输入然后自动搜索数据库并进行一个数据回复了,这个与官方没多大的问题,但小编就微信Token验证失败折腾了许多,下面解决了给各位分析一下。
1.Token验证失败
这个就是要检查配置文件了,最基本的就是
define("TOKEN", "weixin"); weixin 是你的微信开发后台的ID
2.请求URL超时
这个没什么办法多提交几次了,这个还有就是服务器安装了安全狗之类的软件把微信IP给拦截了,可以检查一下。
3.官方下载一个wechatCallbackapiTest类然后进行一下操作即可
代码如下 | 复制代码 |
define("TOKEN", "weixin"); |
wechatCallbackapiTest类就代码如下
代码如下 | 复制代码 |
class wechatCallbackapiTest private function checkSignature() $token = TOKEN; if( $tmpStr == $signature ){ public function responseMsg() if (!empty($postStr)){ |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software