-
九佰佬 2022-05-22
兼容PHP5.2低版本的UTF-8转GB编码
//UTF-8 转 GB 编码 function utf_gb($utfstr) { if(function_exists('iconv')) { return @iconv('utf-8','gbk//ignore',$utfstr); } if(trim($utfstr)=="") { return&n...
-
九佰佬 2022-05-08
对HTML源码及内容过滤,取出纯文字
//去除THML代码 function html_to_txt($document) { $search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript "'<[\/\!]*?[^<>]*?>'...
-
九佰佬 2022-04-15
兼容PHP5.2低版本的GB转UTF-8编码
//GB 转 UTF-8 编码 function gb_utf($gbstr) { if(function_exists('iconv')) { return @iconv('gbk','utf-8//ignore',$gbstr); } if(trim($gbstr)=="") { return ...
-
九佰佬 2022-03-07
判断内容是否UTF编码
//判断是否UTF[2012-1-1,修改] function is_str_utf($word) { if (preg_match("/^([".chr(228)."-".chr(233)."]{1}[".chr(128)."-".chr(191)."]{1}[".chr(128)."-".chr(191).&...




