PHP数组方式瓶装 $opts = array('http' => array( 'method' => 'POST', 'header' => "Content-Type: text/xml\r\n". "Authorization: Basic ".base64_encode("$https_user:$https_password")."\r\n". "Content-type: application/x-www-form-urlencoded\r\n", 'content' => $body, 'timeout' => 60 ) ); $context = stream_context_create($opts);