如果我输入到mysql
htmlspecialchars("test'ed", ENT_QUOTES, 'UTF-8')
其存储为test'ed。
如果我使用
htmlspecialchars( $_POST["txtfirstname"], ENT_QUOTES, 'UTF-8')
其存储为测试
当使用公布的数据时,斜杠是怎么回事?
关闭魔术引号,或使用条带斜线。正在为您插入斜线。
http://php.net/manual/en/function.stripslashes.php
如果我输入到mysql
htmlspecialchars("test'ed", ENT_QUOTES, 'UTF-8')
其存储为test'ed。
如果我使用
htmlspecialchars( $_POST["txtfirstname"], ENT_QUOTES, 'UTF-8')
其存储为测试
当使用公布的数据时,斜杠是怎么回事?
关闭魔术引号,或使用条带斜线。正在为您插入斜线。
http://php.net/manual/en/function.stripslashes.php