方法3:用file_get_contents函数,以post方式获取url <?php $data = array ('foo' => 'bar'); 1. 2. //生成url-encode后的请求字符串,将数组转换为字符串 $data = http_build_query($data); $opts = array ( 'http' => array ( 'method' => 'POST', 'header'=> "Content-type: application/...
方法3:用file_get_contents函数,以post方式获取url<?php $data = array ('foo' => 'bar'); 1. 2.//生成url-encode后的请求字符串,将数组转换为字符串 $data = http_build_query($data); $opts = array ( 'http' => array ( 'method' => 'POST', 'header'=> "Content-type: application/x...