/**
* post 发送JSON 格式数据
* @param $url string URL
* @param $data_string string 请求的具体内容
* @return array
* code 状态码
* result 返回结果
*/
public static function postJsonData($url, $data = NULL)
{
//https://mall.xiangtuan.xyz/api/commodity/product/list/wOfU8PT0rR/762228872210333985
//{"pageNum":1,"pageSize":10,"sortedType":1,"sortedModel":1}
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYP
post发送json数据
最新推荐文章于 2024-07-06 15:41:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)