测试222
2017-02-03 20:58:12 by ksust
function send_post($url, $post_data) {//post方法,请求的url,提交的post数组 $postdata = http_build_query($post_data); $options = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-type:application/x-www-form-urlencoded', 'content' => $postdata, 'timeout' => 90 * 60 // 超时时间(单位:s) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); return $result;//返回网页内容 } function curl_post($url,$post_data){ $conn=curl_init($url); curl_setopt($conn,CURLOPT_POST,1); curl_setopt($conn,CURLOPT_POSTFIELDS,http_build_query($post_data)); curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);//参数1 不显示 curl_setopt($conn, CURLOPT_HTTPHEADER, array( /*对springmvc 申明提交json数据*/ 'Content-type:application/x-www-form-urlencoded' )); $get=curl_exec($conn); return $get; }
测
卡片面板
结合 layui 的栅格系统
轻松实现响应式布局
轻松实现响应式布局
标题
内容
function send_post($url, $post_data) {//post方法,请求的url,提交的post数组 $postdata = http_build_query($post_data); $options = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-type:application/x-www-form-urlencoded', 'content' => $postdata, 'timeout' => 90 * 60 // 超时时间(单位:s) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); return $result;//返回网页内容 } function curl_post($url,$post_data){ $conn=curl_init($url); curl_setopt($conn,CURLOPT_POST,1); curl_setopt($conn,CURLOPT_POSTFIELDS,http_build_query($post_data)); curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);//参数1 不显示 curl_setopt($conn, CURLOPT_HTTPHEADER, array( /*对springmvc 申明提交json数据*/ 'Content-type:application/x-www-form-urlencoded' )); $get=curl_exec($conn); return $get; }
测
评论
yugao:评论
02月24日 11:10