|
入库时
$str=addslashes($str);
$sql="insert into `tab` (`content`) values('$str')";
出库时
$str=stripslashes($str);
在页面中显示时
$str=htmlspecialchars(nl2br($str)) ; <?php
//$content来自数据库
$content=nl2br(htmlspecialchars($content));
$content=str_replace(" "," ",$content);
$content=str_replace("n","<br>n",$content);
?>
|
|
文章编号
|
272
|
|
创建日期
|
11-24-2007
|
|
修改日期
|
11-24-2007
|
|
发布人
|
laohan
|
|
点评
|
(None)
|
|