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