#AddcSlashes 字符串加入反斜线
#语法:string addcslashes(string str,string charlist);
#在对 0,r,n 和 t 应用 addcslashes() 时要小心。在 PHP 中,\0,\r,\n 和 \t 是预定义的转义序列
=======================================================
<?php
$str = "Hello, my name is John Adams.";
echo $str.'<br>';
echo addcslashes($str,'mJ').'<br>';
echo addcslashes($str,'J');
?>
|