stripslashes:去掉转义字符

addslashes:增加转义字符

<?php
$str = "Is your name O'reilly?";
// 输出:Is your name O\'reilly?
echo addslashes($str);

 

$str = "Is your name O\'reilly?";
// Outputs: Is your name O'reilly?
echo stripslashes($str);


?>

posted on 2009-06-28 14:37  garfieldtom  阅读(345)  评论(0编辑  收藏  举报