这是我的理解,php将urldecode $_GET
和$_REQUEST
,所以我不需要自己
但似乎CI是rawurldecoding $_POST ($this->input->post()),因为全局XSS过滤。我对此很好;但我需要的数据是urldecoded而不是RAWurldecoded。这意味着我需要将+替换为空格(' ')
- 我可以做一个简单的
str_replace
而不引起问题吗? - 我理解php为$_GET和$_REQUEST做什么吗?(手册上是这么说的)?
如果您愿意,可以通过传递参数来禁用XSS过滤。
$this->input->post('post_name', FALSE); // returns specified POST item without XSS filter
$this->input->post(NULL, FALSE); // returns all POST items without XSS filter