|
本帖最后由 无所谓了嘛 于 2016-3-5 20:06 编辑
建立一个demo案例,执行如下代码:
$para_filter = array();
$para = $_GET;
print_r($_GET);
while (list ($key, $val) = each ($_GET)) {
if($key == "sign" || $key == "sign_type" || $val == "")continue;
else $para_filter[$key] = $para[$key];
}
print_r($para_filter);
exit();
GET参数如下:
?buyer_email=wusuoweilema%40163.com&buyer_id=2088002167967008&exterface=create_direct_pay_by_user&is_success=T¬ify_id=RqPnCoPm3K9%252Fvwbh3InUEWHvA6UslzTAGrwpxB%252BFwtWtiuHZbck293fWBfssY3pWumfd¬ify_time=2016-03-05+18%3A39%3A06¬ify_type=trade_status_sync&out_trade_no=1106438735022023&payment_type=1&seller_email=279592358%40qq.com&seller_id=2088111192705735&subject=%E5%88%B0%E6%AD%A4%E4%B8%80%E6%B8%B8%E5%95%86%E5%93%81%E8%B4%AD%E4%B9%B0%E8%AE%A2%E5%8D%95%E6%94%AF%E4%BB%98%3A1606438735022023&total_fee=0.01&trade_no=2015030521001004220263134740&trade_status=TRADE_SUCCESS&sign=1029b82e1db9da7e8527b376f3b4e99d&sign_type=MD5
代码结果为:
Array
(
[buyer_email] => wusuoweilema@163.com
[buyer_id] => 2088002167967008
[exterface] => create_direct_pay_by_user
[is_success] => T
[notify_id] => RqPnCoPm3K9%2Fvwbh3InUEWHvA6UslzTAGrwpxB%2BFwtWtiuHZbck293fWBfssY3pWumfd
[notify_time] => 2016-03-05 18:39:06
[notify_type] => trade_status_sync
[out_trade_no] => 1106438735022023
[payment_type] => 1
[seller_email] => 279592358@qq.com
[seller_id] => 2088111192705735
[subject] => 到此一游商品购买订单支付:1606438735022023
[total_fee] => 0.01
[trade_no] => 2015030521001004220263134740
[trade_status] => TRADE_SUCCESS
[sign] => 1029b82e1db9da7e8527b376f3b4e99d
[sign_type] => MD5
)
Array
(
[buyer_id] => 2088002167967008
[exterface] => create_direct_pay_by_user
[is_success] => T
[notify_id] => RqPnCoPm3K9%2Fvwbh3InUEWHvA6UslzTAGrwpxB%2BFwtWtiuHZbck293fWBfssY3pWumfd
[notify_time] => 2016-03-05 18:39:06
[notify_type] => trade_status_sync
[out_trade_no] => 1106438735022023
[payment_type] => 1
[seller_email] => 279592358@qq.com
[seller_id] => 2088111192705735
[subject] => 到此一游商品购买订单支付:1606438735022023
[total_fee] => 0.01
[trade_no] => 2015030521001004220263134740
[trade_status] => TRADE_SUCCESS
)
buyer_email参数不见了
上面的代码如果是在php纯环境下:没有问题,在ci3.02和3.04下都有问题。
|
|