我有一个,它将使用
'page_description' => htmlspecialchars($this->input->post('content'));
当我在前面看的时候

我如何解码它,使它显示为HTML?
发布于 2014-03-16 02:46:33
PHP中用于与htmlspecialchars/htmlentities相反的函数是解码。
发布于 2014-03-16 02:46:40
删除htmlspecialchars位。这是将<转换为<,因此它作为实际的符号打印出来,而浏览器忽略了它作为HTML的开始。
'page_description' => $this->input->post('content');来自:http://us2.php.net/htmlspecialchars
The translations performed are:
'&' (ampersand) becomes '&'
'"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
"'" (single quote) becomes ''' (or ') only when ENT_QUOTES is set.
'<' (less than) becomes '<'
'>' (greater than) becomes '>'https://stackoverflow.com/questions/22432345
复制相似问题