我错过了bbCode的换行符 [英] Im missing newline with bbCode
问题描述
我使用bbCode函数在我的网站上启用文本格式。问题是我遇到换行问题。有时会创建
< p > < / p >
没有理由,有时我根本没有得到任何换行符......
多行换行: http://checkoff.org/index.php?page=articles&action=view_article&article_id=8 [<一个href =http://checkoff.org/index.php?page=articles&action=view_article&article_id=8target =_ blanktitle =New Window> ^ ]
无新行: http:// checkoff。 org / index.php?page = articles& action = view_article& article_id = 6 [ ^ ]
这是我的代码:
<?php
$ get_article_text = bbcode( $ get_article_text);
$ get_article_text = str_replace( {linebreak }, \ n,$ get_article_text);
echo
< h1> $ get_article_title< / h1>
< p> $ get_article_text< / p>
;
?>
和我的bbCode函数:
http://pastebin.com/xhGKrY3f [ ^ ]
get_article_text = bbcode(
get_article_text);
get_article_text = str_replace( {linebreak}, \ n ,
I use bbCode function to enable text formatting on my website. The problem is that I get problems with newline. Sometimes it creates
<p></p>
without reason, and sometimes I dont get any newlines at all...
To much newline: http://checkoff.org/index.php?page=articles&action=view_article&article_id=8[^]
No newline: http://checkoff.org/index.php?page=articles&action=view_article&article_id=6[^]
This is my code:
<?php
$get_article_text = bbcode($get_article_text);
$get_article_text = str_replace("{linebreak}", "\n", $get_article_text);
echo"
<h1>$get_article_title</h1>
<p>$get_article_text</p>
";
?>
And my bbCode function:
http://pastebin.com/xhGKrY3f[^]
get_article_text = bbcode(
get_article_text);
get_article_text = str_replace("{linebreak}", "\n",
这篇关于我错过了bbCode的换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!