file_get_contents()无法取得https内容

[php] 2024-04-25 圈点653

摘要:file_get_contents()可以远程http的内容;但是无法取得https的内容,需要添加openssl扩展组件。

file_get_contents()无法取得https内容

file_get_contents()可以远程http的内容;但是无法取得https的内容,需要添加openssl扩展组件。

php编译如何添加openssl扩展组件,和php编译正常的扩展组件有点区别,

需要将ext/openssl/里的 config0.m4 更名为config.m4,

然后再按正常扩展组件编译即可。

其实很多时候,curl和file_get_contents()有很多相互补充的地方。

https  

感谢反馈,已提交成功,审核后即会显示