用的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的標籤給除了。