We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`<?php
namespace app\api\controller;
use EasyWeChat\Factory; use think\facade\Log;
class Wechat extends Controller { public function serve() { $app = Factory::officialAccount(config('wechat.official_account'));
$app->server->push(function($message) { return "您好!欢迎使用我们的公众号!"; }); // return $app->server->serve(); $response = $app->server->serve();
// 将响应输出 $response->send(); exit; }
}`
代码如上。debug 发现已经发送了
X-Powered-By: PHP/7.4.33 Cache-Control: no-cache, private Date: Sun, 27 Oct 2024 07:12:03 GMT Content-type: text/html; charset=UTF-8
7551929723859630014
提示token验证失败
The text was updated successfully, but these errors were encountered:
因为你输出了多余的 header 头。
Sorry, something went wrong.
No branches or pull requests
我用的环境
问题及现象
`<?php
namespace app\api\controller;
use EasyWeChat\Factory;
use think\facade\Log;
class Wechat extends Controller
{
public function serve()
{
$app = Factory::officialAccount(config('wechat.official_account'));
// 将响应输出
$response->send(); exit;
}
}`
代码如上。debug 发现已经发送了
X-Powered-By: PHP/7.4.33
Cache-Control: no-cache, private
Date: Sun, 27 Oct 2024 07:12:03 GMT
Content-type: text/html; charset=UTF-8
7551929723859630014
提示token验证失败
The text was updated successfully, but these errors were encountered: