w7corp / easywechat

📦 一个 PHP 微信 SDK
https://easywechat.com
MIT License
10.27k stars 2.4k forks source link

sowft2.0.5 服务端验证微信token, serve 后怎么返回 #1695

Closed ZhuRongGo closed 4 years ago

ZhuRongGo commented 4 years ago

我用的环境

问题及现象

swoft 框架不能使用 exit ,文档中说 $response->send() 直接输出(echo)了,请问用swoft 的方式怎么去做

$app = Factory::officialAccount($config);

$response = $app->server->serve();

// 将响应输出
$response->send(); 
//后面应该怎么写
overtrue commented 4 years ago

非 PHP 官方环境请自行解决。

Zhurf notifications@github.com于2019年9月26日 周四下午12:59写道:

我用的环境

  • PHP 版本:7.2
  • overtrue/wechat 版本:4.1
  • 是否使用了框架?框架名称: swoft2.0.5

问题及现象

swoft 框架不能使用 exit ,文档中说 $response->send() 直接输出(echo)了,请问用swoft 的方式怎么去做

$app = Factory::officialAccount($config);

$response = $app->server->serve();

// 将响应输出

$response->send();

//后面应该怎么写

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/overtrue/wechat/issues/1695?email_source=notifications&email_token=AALHOYC5CFRZJJVZO5V26Y3QLQ6SDA5CNFSM4I2VA5J2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNY56KQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AALHOYASYKX6L54A6WACHTLQLQ6SDANCNFSM4I2VA5JQ .