'context' => [
'ssl'=>[
'local_cert' => '/www/wwwroot/dh.aaaaaaa.com/coupon/extend/utils/wechart/ssl/server.pem', // 也可以是crt文件
'local_pk' => '/www/wwwroot/dh.aaaaaaa.com/coupon/extend/utils/wechart/ssl/server.key',
'verify_peer' => false,
]
],
'transport' =>'ssl',
在配置文件加入以下代码即可