Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何清理函数参数?我有一个类似的网址:example.com/controller/function/parameter,该参数将用于从数据库中获取数据。
有特定功能还是我需要使用mysql_real_escape_string?
mysql_real_escape_string
使用本机 CI 方法/函数非常简单:
$param = xss_clean($this->uri->segment(2));
然后将参数传递给 SQL 查询。