一直报获取access_token失败,看后面的log发现 url获取数据时,调用file_get_contents()失败。
file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
一查原来是调用https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET是用https。但是电脑的php.ini没有把;extension=php_openssl.dll放开
。放开后就正常了。

本文详细阐述了在使用PHP调用HTTPS接口获取access_token时遇到的失败问题,通过检查PHP配置文件并开启openssl扩展,最终成功解决问题的过程。包括问题定位、解决步骤及后续验证。
1554

被折叠的 条评论
为什么被折叠?



