laravel框架中的Input:all()获取请求参数,与php原生$REQUEST获取参数的区别?$input = Input:all();$input = '{"P_UserId":"10","P_OrderId":"23027220180330184207","P_CardId":"qw12345","P_CardPass":null,"P_FaceValue":"0.010","P_ChannelId":"alipay","P_Subject":null,"P_Price":null,"P_Quantity":null,"P_ErrCode":"0","P_Description":"test","P_Notic":"240","P_PostKey":"e83053855f6f11eb154af9c5deaf6341"}';
$_REQUEST = '{"P_UserId":"10","P_OrderId":"92986320180330185035","P_FaceValue":"0.010","P_ErrCode":"0","P_PostKey":"9ccc3f6a438377853d511d17d6bfafc9"}';
光从数据上看,Input:all()把空数据也获取了,而$_REQUEST 过滤了空数据。具体区别是啥呢?
1 回答

aluckdog
TA贡献1847条经验 获得超7个赞
题目有错误。数据是一样。$input='{"P_UserId":"10","P_OrderId":"92986320180330185035","P_FaceValue":"0.010","P_ErrCode":"0","P_PostKey":"9ccc3f6a438377853d511d17d6bfafc9"}';
- 1 回答
- 0 关注
- 785 浏览
添加回答
举报
0/150
提交
取消