作者qazsd (nice play!)
看板PHP
标题Re: [请益] 再次请教关於限制存取页面及换行
时间Mon Oct 22 00:36:32 2007
你试着开个新页面
然後在适当的位置插入下列程式码(<body>仅供位置参考):
<body>
<?php
echo date("123"), nl2br("\n");
echo date("456"); echo date("789");
?>
</body>
应该就知道怎麽用了
※ 引述《yilenwu ( )》之铭言:
:
※ 发信站: 批踢踢实业坊(ptt.cc)
: ◆ From: 59.105.93.249
: → yilenwu:试了一下~直接连在一起也不行@@ 10/20 23:20
: 推 LPH66:Oh my god....直接看这里吧 http://tw.php.net/nl2br 10/20 23:27
: 我改成这样不行@@
: $insertSQL = sprintf("INSERT INTO epdata (ep_title, ep_content, ep_date) VALUES (%s, %s, %s)",
: GetSQLValueString($_POST['ep_title'], "text"),
: GetSQLValueString($_POST['ep_content'], "text"),
: GetSQLValueString($_POST['ep_date'], "date"));
: <?php echo nl2br($_POST['ep_content']) ?>
: 改成这样也不行@@
: $insertSQL = sprintf("INSERT INTO epdata (ep_title, ep_content, ep_date) VALUES (%s, %s, %s)",
: GetSQLValueString($_POST['ep_title'], "text"),
: <?php echo nl2br($_POST['ep_content'], "text") ?>,
: GetSQLValueString($_POST['ep_date'], "date"));
: 请问应该要怎样改才对呢
: 我好像没什麽慧根 对不起><
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.127.20.190
※ 编辑: qazsd 来自: 59.127.20.190 (10/22 00:36)
※ 编辑: qazsd 来自: 59.127.20.190 (10/22 00:39)
1F:→ qazsd:php的nl2br("\n")大概就等於html里的<br>吧 10/22 00:40