在php中,利用file_get_contents函数抓取url是https开头的网站网页内容时,会出现类似下面的错误警告: Warning: file_get_contents(https://127.0.0.1/index.php) [function.file-get-contents]: failed to open stream: Invalid argument in E:\website\blog\test.php on line 25 打开php.ini找到 ;extension=php_openssl.dll ,去掉双引号”;” ,重启web服务器即可。
学习php需要了解的点4 - PHP中file_get_contents函数抓取https地址出错的解决方法
最新推荐文章于 2021-03-22 13:24:23 发布