码迷,mamicode.com
首页 > Web开发 > 详细

php post请求

时间:2018-01-29 15:46:37      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:log   eal   $_server   query   options   manager   creat   create   min   

public function file_get_contents_post($url, $post){
  $options = array(
    ‘http‘=> array(
      ‘method‘=>‘POST‘,
      ‘content‘=> http_build_query($post),
    ),
  );
  $result = file_get_contents($url,false, stream_context_create($options));
  return $result;
}

file_get_contents_post($_SERVER[‘HTTP_HOST‘]."/Admin/RisManager", array(‘LocalName‘=>$basic_user[‘real_name‘]));

php post请求

标签:log   eal   $_server   query   options   manager   creat   create   min   

原文地址:https://www.cnblogs.com/nyfz/p/8376110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!