CodeIgniter actually has several methods for filtering dangerous HTML codes, the most common of which are as follows:
1. You can choose to use the htmlspecialchars() method to filter.
2. You can set $config['global_xss_filtering'] = FALSE; in the config.php file under the config folder to:
Copy code The code is as follows:
$config['global_xss_filtering'] = true;
But this setting will increase the server overhead. So set it according to the situation.
3. You can set the second parameter to true in a post like $this->input->post('content'):
Copy code The code is as follows:
$this->input->post('content', true);
The above three methods can achieve simple filtering of data, and the specific use depends on the situation.
http://www.bkjia.com/PHPjc/788605.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/788605.htmlTechArticleCodeIgniter actually has several methods to filter HTML dangerous codes, the most common of which are as follows: 1. You can optionally use the htmlspecialchars() method to filter. 2. You can download the config folder...