thinkphp I方法獲取不到值、filter_var

用的TP的I方法,設置I('key','',"string")

當前臺傳入"<>"等html標籤的時間發現,I方法獲取不到值,追了下Tp的代碼。I方法有段這樣的代碼:

$data   =   filter_var($data,is_int($filter) ? $filter : filter_id($filter));
當用string過濾的時候,相當於filter_var("<ssss>",FILTER_SANITIZE_STRING)

這個除去html標籤,或除去編碼特殊字符,所以把html的標籤給除了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章