|
用HTML断行符代替换行符
<!--test.php-->
<?php
print"<html>";
print"<head>";
print"<title>网络随笔</title>";
print"</head>";
print"<body>";
if(isset($text))
{
print"<b>正常的文字。</b><br>";
print($text);
print"<br>";
$text=ereg_replace(10,"<br>",$text);
$text=ereg_replace(13," ",$text);
print"<b>修改后的文字。</b><br>";
print($text);
print"<br>";
}
print"<form action=index.php>";
print"<textarea name=text cols=40 rows=10>";
print"</textarea><br>";
print"<input type=submit>";
print"</form>";
print"</body>";
print"</html>";
?>
|