问题:
解决:file_get_contents()或file()加入如下代码
$stream_opts = [
"ssl" => [
"verify_peer"=>false,
"verify_peer_name"=>false,
]
];
$file = file('https://baidu.com',false,stream_context_create($stream_opts));
问题:
解决:file_get_contents()或file()加入如下代码
$stream_opts = [
"ssl" => [
"verify_peer"=>false,
"verify_peer_name"=>false,
]
];
$file = file('https://baidu.com',false,stream_context_create($stream_opts));