- 出现这种一般是是访问https的地址,ssl验证访问导致的
$arrContextOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
]
];
$response = file_get_contents($voucherImageBase64, false, stream_context_create($arrContextOptions));
file_put_contents($voucherImage, $response);