空白字符转换有关问题

WBOY
Release: 2016-06-13 13:52:17
Original
992 people have browsed it

空白字符转换问题

echo $_POST['aaa'].'
';
function htmlpost($x){
$x1=array(' ');
$x2=array(" ");
$x=str_replace($x1,$x2,$x);
return $x;
}
echo $_POST['aaa']=htmlpost($_POST['aaa']);
?>


 
 


在输入框输入连续两个以上空白字符
按第一次提交没有问题,空白字符可以转换 ,但是按第二次提交,空白的字符没有转换为 
请问什么原因?

------解决方案--------------------
utf8
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template