textarea提交上来的表单空格被去掉了,用什么函数解决?
回车用nl2br,空格呢?? 问题点数:25、回复次数:5Top
1 楼hoyou(((( UP,并快乐着 ))))回复于 2003-02-04 14:07:38 得分 0
是不是这个
$data = str_replace(" "," ",$data);
$data = stripslashes($data);
Top
2 楼hoyou(((( UP,并快乐着 ))))回复于 2003-02-04 14:07:53 得分 0
试一试Top
3 楼hoyou(((( UP,并快乐着 ))))回复于 2003-02-04 14:13:05 得分 0
可以了
谁能解释一下stripslashes()函数是做什么用diTop
4 楼LeeMaRS(小菜虎,仍需努力)回复于 2003-02-05 17:11:10 得分 15
stripslashes
(PHP 3, PHP 4 )
stripslashes -- Un-quote string quoted with addslashes()
Description
string stripslashes ( string str)
Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes are made into a single backslash.
See also addslashes().
来自PHP手册.Top
5 楼KEBB(化石)回复于 2003-02-05 17:36:15 得分 10
中文解释可以去http://www.hooday.com看。
Top




