<?php
paserRequest($_SERVER["QUERY_STRING"]);
function paserRequest($strReq)
{
parse_str($strReq);//解析请求参数
$cpIds = explode(',', $cp);//按逗号分隔
$cpArray = array();
for($index=0;$index<count($cpIds);$index++){
array_push($cpArray,array(
"cp" => (int)( $cpIds[$index] ),
"flag" => -1,
"fc" => 0,
"ta" => 1,
"cr" => $cpIds[$index])
);
} //构造数组
$jsonFinal = array("data" => $cpArray, "seq"=>$seq);
php解析请求url并返回json数据
最新推荐文章于 2022-10-11 17:20:40 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)