簡體   English   中英

“安全”助手在CodeIgniter中不起作用

[英]'Security' helper not working in CodeIgniter

我正在使用CodeIgniter v 3.1.4。 在形式之一,我有一個文本框的網址(例如保存https://stackoverflow.com/questions/askhttp://google.com等)到MySQL數據庫。

保存之前,我正在清理如下所示的網址:

內部構造函數:

$this->load->helper('security');

內部添加功能:

$hlt_url    = $this->security->xss_clean($this->input->post('txtHLnk'));
$hlt_hlines = $this->security->xss_clean($this->input->post('txtAreaHLine'));

當我在文本框中輸入簡單/純字符串時,數據將保存在數據庫中,但是當我在文本框中輸入url時,數據未保存在DB中,也不會顯示任何錯誤消息。

請用代碼解釋我做錯了什么。 謝謝

$hlt_url = $this->input->post('txtHLnk', true); $hlt_hlines = $this->input->post('txtAreaHLine', true);

我想這是最新版本中清理輸入的新實現。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM