<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<?
$input = $_POST[content]; //........................获取要分割的字符串
$mode="/[,。]/"; //......................用“逗号” 和 “句号” 分割字符串
$output = preg_split($mode,$input,10000,PREG_SPLIT_NO_EMPTY);
foreach($output as $outputOne){ //..................循环输出(出现乱码)
echo($outputOne);
}
</body>
</html>
我就是想用 逗号 和 句号 分割 表单提交上来 的 文章, 文章只有很少的字的时候不会出现乱码,字多的时候 就会出现乱码。
请问为什么? 应该怎样解决? 谢谢了。