怎样让文章的每段前面留两个中文全角的空格?(贴代码) 你插入数据的时候$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如何捕获iconv在编码转换时的异常? 学php必须会javascript对吗? 如何实现 23:55分 后再加10分钟后变成第二天的0:5分 与ajaxa有关的 select取值问题 PHP从数据库读取中文信息乱码 拜托各位大哥!!解决变量传递问题的问题? mail()函数发送后时间问题 PHP.ini无法正常工作 求助。请求服务器PHP文档,永远返回 HTTP 500 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')");
}
?>