News新闻

业界新闻动态、技术前沿
Who are we?

您的位置:首页      网络营销      PHP接口并发测试的方法(推荐)

PHP接口并发测试的方法(推荐)

如下所示:header('Content-type:text/html; Charset=utf-8');$uri = "输入你的url";$data = array('test'=1);$ch = curl_init();// print_r($ch);curl_setopt($ch, CURLOPT_URL, $uri);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_HEADER, 0);curl_se

如下所示:

header('Content-type:text/html; Charset=utf-8');

      $uri = "输入你的url";

      $data = array(
        'test'=>1
      );
      $ch = curl_init();
// print_r($ch);
      curl_setopt($ch, CURLOPT_URL, $uri);
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
      $return = curl_exec($ch);
      curl_close($ch);
    我要评论
    共有 人参与,评论 条,顶帖 [点击查看]
  • 验证码:
  • 所有评论仅代表网友意见,与本站立场无关!