请教个表单提交后信息的处理问题 要插在sql里面的都要处理过 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 htmlspecialchars("$ntxt");用这个函数处理,但是从数据库读取的同时,输出,也应该处理处理类似:$text = eregi_replace('&',('&'),$text);$text = eregi_replace('<',('<'),$text);$text = eregi_replace('>',('>'),$text);$text = eregi_replace('"',('"'),$text); $text = htmlspecialchars($text); $text = str_replace("\n ", "<br> ", $text); $text = str_replace("\n", "<br>", $text); $text = str_replace(" ", "", $text);具体的你可以看下:http://art.21e.cn/tec/7/witchina1644.htm SQL文件导入问题 关于javascript的innerHTML和write php设置当前脚本运行时间 mysql中NULL代表什么? 求教关于ajax的问题 php基础 请问如何用php实现网页动态变静态 PHP中的 ' 问题 包含文件问题 哪位大神能给菜鸟小弟写个php转化函数 apache错误 下载.xls文件出现乱码问题(急,在线等)
用这个函数处理,但是从数据库读取的同时,输出,也应该处理
处理类似:
$text = eregi_replace('&',('&'),$text);
$text = eregi_replace('<',('<'),$text);
$text = eregi_replace('>',('>'),$text);
$text = eregi_replace('"',('"'),$text); $text = htmlspecialchars($text);
$text = str_replace("\n ", "<br> ", $text);
$text = str_replace("\n", "<br>", $text);
$text = str_replace(" ", "", $text);具体的你可以看下:http://art.21e.cn/tec/7/witchina1644.htm