file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL

出现这种一般是是访问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);

//这里修改编码

 $contents = iconv("gb2312", "utf-8//IGNORE",$contents);

标签: none

添加新评论