0
當值包含字符+
(加號)時,這是命名參數值的問題。CakePHP plus將命名參數解碼爲空間
URL是http://localhost/kidwatcher/messages/sentbox/number:+6581235251237
當我嘗試var_dump
命名paramater(在這種情況下是number
),字符+
變成了空間。
string(14) " 6581235251237"
性格+
是%2B
,結果是相同的,當我改變網址:
http://localhost/kidwatcher/messages/sentbox/number:%2B6581235251237
string(14) " 6581235251237"
但是當我使用URL查詢字符串,它的工作原理。
http://localhost/kidwatcher/messages/sentbox?number=%2B6581235251237
string(14) "+6581235251237"
命名參數有什麼問題?