PHP 服务器无法保证在五秒内处理并回复 可调用客服接口来异步回复(微信)

立即返回(异步执行)

 ignore_user_abort(true);
 echo 'success'; // send the response
 header('Connection: close');
 header('Content-Length: ' . ob_get_length());
 ob_end_flush();
 ob_flush();
 flush();

//以下为调用客服消息接口,回复用户消息的代码