出現這種一般是是訪問https的地址,ssl驗證訪問導致的
$opts = array ('ssl' => array ('verify_peer' => false,'verify_peer_name' => false ),'http' => array ('method' => 'POST','header' => 'Content-type:application/x-www-form-urlencoded;charset=utf-8','content' => urldecode ( $postdata ) ) );
$context = stream_context_create ( $opts );
$result = file_get_contents ( $url, false, $context );
發表評論