多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~ /** * 返回经htmlspecialchars(字符转html)处理过的字符串或数组 * @param $obj 需要处理的字符串或数组 * @return mixed */ function new_html_special_chars($string) { $encoding = 'utf-8'; if(strtolower(CHARSET)=='gbk') $encoding = 'ISO-8859-15'; if(!is_array($string)) return htmlspecialchars($string,ENT_QUOTES,$encoding); foreach($string as $key => $val) $string[$key] = new_html_special_chars($val); return $string; } function new_html_entity_decode($string) { $encoding = 'utf-8'; if(strtolower(CHARSET)=='gbk') $encoding = 'ISO-8859-15'; return html_entity_decode($string,ENT_QUOTES,$encoding); } function new_htmlentities($string) { $encoding = 'utf-8'; if(strtolower(CHARSET)=='gbk') $encoding = 'ISO-8859-15'; return htmlentities($string,ENT_QUOTES,$encoding); } ~~~