php使用file_get_contents请求微信接口失败

windows下的php,只需要到php.ini中把extension=php_openssl.dll前面的;删掉,重启服务就可以了。
Linux下的PHP,就必须安装openssl模块,安装好了以后就可以访问了。


如果服务器你不能修改配置的话,那么就使用curl函数来替代file_get_contents函数

原文地址:https://www.cnblogs.com/bubuchu/p/7442585.html