鍍金池/ 問答/PHP/ laravel框架中的Input:all()獲取請求參數(shù),與php原生$REQU

laravel框架中的Input:all()獲取請求參數(shù),與php原生$REQUEST獲取參數(shù)的區(qū)別?

laravel框架中的Input:all()獲取請求參數(shù),與php原生$REQUEST獲取參數(shù)的區(qū)別?
$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"}';

光從數(shù)據(jù)上看,Input:all()把空數(shù)據(jù)也獲取了,而$_REQUEST 過濾了空數(shù)據(jù)。具體區(qū)別是啥呢?

回答
編輯回答
小曖昧

題目有錯誤。數(shù)據(jù)是一樣。$input='{"P_UserId":"10","P_OrderId":"92986320180330185035","P_FaceValue":"0.010","P_ErrCode":"0","P_PostKey":"9ccc3f6a438377853d511d17d6bfafc9"}';

2018年4月18日 04:00