时间:2021-07-01 10:21:17 帮助过:4人阅读
0xa0 ? $H_start+1 : $H_start); for($i = $H_start; $i < $H_str_len; $i++){ if($i >= ($H_start+$H_len)) break; $H_size = ord(substr($H_str, $i, 1)) > 0xa0 ? 3 : 1; $H_tmep .= substr($H_str, $i, $H_size); $i += $H_size > 1 ? 1 : 0; } if(($H_flag == "Y" && $H_start+$H_len < $H_str_len) || $H_flag == "YY"){$H_tmep.="...";} return $H_tmep; } function H_preg_repe($H_str){ $H_searh = array ("''si", "'<[\/\!]*?[^<>]*?>'si", "'([\r\n])[\s]+'", "'&(quot|#34);'i", "'&(amp|#38);'i", "'&(lt|#60);'i", "'&(gt|#62);'i", "'&(nbsp|#160);'i", "'&(iexcl|#161);'i", "'&(cent|#162);'i", "'&(pound|#163);'i", "'&(copy|#169);'i", "'(\d+);'e"); $H_reple = array ("", "", "\\1", "\"", "&", "<", ">", " ", chr(161), chr(162), chr(163), chr(169), "chr(\\1)"); return trim(addslashes(nl2br(stripslashes(preg_replace($H_searh,$H_reple,$H_str))))); } echo "批量添加摘要成功";?>
$H_char = 'utf-8'; //这个错了,mysql 的开发者最初在书写代码时漏写了一个“-”,导致这个问题一直延续到今天
$H_char = 'utf8';
MySQL 中 utf-8 需写作 utf8