相关关键词
关于我们
最新文章
PHP接口并发测试的方法(推荐)
发布日期:2016-12-15 00:00:00
81
如下所示:
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);