怎样让文章的每段前面留两个中文全角的空格?(贴代码) 你插入数据的时候$str=" ".你处理完的数据 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 好像可以获取到\r\n的东东,你看\r\n前面是否还有空格,如果有就可以让它成一段,然后在前面加就可以了。 是不是这种效果?<?phpif($_POST['submit']){ $wtitle=$_POST['wtitle']; $wpost=strip_tags($_POST['wpost']); echo("<p>转换后:</p>$wpost"); $wpost=" $wpost"; $wpost=str_replace("\r\n","<br /> ",$wpost); echo("<p>转换后:</p>$wpost"); //$w->insert("insert into table(wtitle,wcontent) values ('$wtitle','$wcontent')");}?><html><head><title>发表帖子</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /></head><body><form name="form1" action="" method="post" enctype="multipart/form-data"> <table> <tr> <td>标题:</td> <td><input name="wtitle" type="text" size="78" /></td> </tr> <tr> <td>内容:</td> <td><textarea name="wpost" cols="60" rows="16"></textarea></td> </tr> <tr> <td align="center" colspan="2"> <br /><input name="submit" type="submit" value=" 发 表 " /> <input type="reset" value=" 重 置 " /> </td> </tr> </table></div></form></body></html> <?phpif($_POST['submit']){ $wtitle=$_POST['wtitle']; $wpost=strip_tags($_POST['wpost']); echo("<p>转换前:</p>$wpost"); $wpost=" $wpost"; $wpost=str_replace("\r\n","<br /> ",$wpost); echo("<p>转换后:</p>$wpost"); //$w->insert("insert into table(wtitle,wcontent) values ('$wtitle','$wcontent')");}?> PHP创建目录的问题!~ 怎么判断一个网页是否被完全接收 php_ini中log_errors_max_len属性的设置 PHP 怎么做如何定时发送邮件 PHP一个小功能 php+Mysql数据库乱码问题 如何使用section form提交后,取回提交前数据的问题(急!!,在线等!) 正在开发中的PHP 5.0的新特色(将于几个月内发布)[英文] php中如何统计数组长度,急 phpmyadmin安装的问题,且mysql不能备份数据库 如何以文件容量大小来排序
<?php
if($_POST['submit']){
$wtitle=$_POST['wtitle'];
$wpost=strip_tags($_POST['wpost']); echo("<p>转换后:</p>$wpost");
$wpost=" $wpost";
$wpost=str_replace("\r\n","<br /> ",$wpost);
echo("<p>转换后:</p>$wpost"); //$w->insert("insert into table(wtitle,wcontent) values ('$wtitle','$wcontent')");
}
?><html>
<head>
<title>发表帖子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
</head><body>
<form name="form1" action="" method="post" enctype="multipart/form-data">
<table>
<tr>
<td>标题:</td>
<td><input name="wtitle" type="text" size="78" /></td>
</tr>
<tr>
<td>内容:</td>
<td><textarea name="wpost" cols="60" rows="16"></textarea></td>
</tr>
<tr>
<td align="center" colspan="2">
<br /><input name="submit" type="submit" value=" 发 表 " />
<input type="reset" value=" 重 置 " />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
<?php
if($_POST['submit']){
$wtitle=$_POST['wtitle'];
$wpost=strip_tags($_POST['wpost']); echo("<p>转换前:</p>$wpost");
$wpost=" $wpost";
$wpost=str_replace("\r\n","<br /> ",$wpost);
echo("<p>转换后:</p>$wpost"); //$w->insert("insert into table(wtitle,wcontent) values ('$wtitle','$wcontent')");
}
?>