私は php と html の初心者なので、弱い質問があります
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> まず、メッセージを残すためのいくつかのプロセス (メッセージを書く、送信する、表示する、(検索する) など) を決定します。そして、Bamboo の場合、ゲストブックの管理は不可欠です。このように、6 PHP を目標にすることもできます。ファイル、1 つのテキスト ファイル: guest.php manage.php Reply.php sys.php del.php edit.php、1 つのテキスト ファイル: guest.txt まず、guest.php の内容を見てみましょう。もちろん、次の内容を php Web ページに直接組み込むこともできます。作者の作品を尊重してください。 ------------------------ //guest.php:<? require("sys.php"); if ($B1) { if ($message=="" または $name=="") { $errorm="<font color=red>エラー!!!</font>名前とメッセージの内容は必須です"; } それ以外 { #データの書き込み $space = " "; $time = date(Y年m月d日H時i分); $ip=$REMOTE_ADDR; $name=エンコード($name); $homepage=エンコード($homepage); $from=エンコード($from); $email=エンコード($email); $message=ストリップスラッシュ($message); $message=htmlspecialchars($message); $message=check_strlen_long($message); $message=nl2br($message); $guestcontent = "<tr><td><font color=#AB00E1>メッセージコンテンツ:</font><br><!--content>$message<!--endcontent> "; $guestcontent=$guestcontent."<br><font color=#6633FF>メッセージを残した人の名前:</font><!--name>$name<!--endname> "; if ($email !="") {$guestcontent=$guestcontent."<br><font color=#9900CC>メール</font><a href="mailto:$email"><!--メール>$メール< !- -endemail></a>"."$space";} if ($homepage !="http://") {$guestcontent=$guestcontent."<font color=#9900CC>ホームページ:</font>$hompage<a href="$homepage"><!--homepage>$homepage<!--endhomepage> </a>";} $guestcontent=$guestcontent."<br><font color=#0000FF>時刻:$time 開始時刻:<!--from>$from<!--endfrom> $ip</font>"; $guestcontent=ereg_replace(chr(10),"",$guestcontent); $guestcontent=$guestcontent."<hr size=1></td></tr>n"; $fp=fopen($guestfile,"a"); fputs($fp,$guestcontent); fclose($fp); } } ?> <html> <title>ジハオンラインブック</title> <!-- A:link {テキスト装飾: なし; 0000ff} A: 訪問しました {テキスト装飾: なし; A:active {テキスト装飾: なし} A:hover {テキスト装飾:下線色:ff0000} 本文 {FONT-SIZE:10pt} TH {FONT-SIZE:10 pt} TD {FONT-SIZE: 10pt} テキストエリア { FONT-FAMILY: "宋体"; フォント サイズ: 10pt; } --> </スタイル> <本文 bgcolor=#FFFFFD 背景="bg.jpg"> <div align="center"> <?include('head.htm');?> <表の幅="68%" border="1" cellpadding="3" cellpacing="0" bordercolor="#E3E3E3"> <フォームメソッド="POST" アクション="guest.php"> if($errorm) { echo "<tr>"; echo "<tdcolspan height="32">"; エコー「$errorm」; echo "</td>"; echo "</tr>"; } ?> <tr> <td width="22%" bgcolor="#F0F0F0"><font color="#000000">姓名<font color="#FF0033">(必填)</font></font></td> <td colspan="2" width="78%" bgcolor="#F0F0F0"><font color="#00FF00"> <input type="text" name="name" size="40"> </font></td> </tr> <tr> <td width="22%" height="29">主页:</td> <td colspan="2" height="29" width="78%"> <input type="text" name="homepage" size="40" value="http://"> </td> </tr> <tr> <td width="22%" height="27" bgcolor="#F0F0F0">来自:</td> <td colspan="2" height="27" width="78%" bgcolor="#F0F0F0"> <input type="text" name="from" size="40"> </td> </tr> <tr> <td width="22%" height="20">Email:</td> <td colspan="2" height="20" width="78%"><font color="#00FF00"> <input type="text" name="email" size="40"> </font></td> </tr> <tr> <td colspan="3" valign="middle" align="left"> <div align="center"><font color="#000000">请留言</font><font color="#FF0033">(必填)</font><font color="#00FF00"><br> <textarea rows="6" name="message" cols="55" wrap="VIRTUAL"></textarea> </font></div> </td> </tr> <tr bgcolor="#F0F0F0"> <td colspan="3" height="24"> <div align="center"><font color="#00FF00"> <input type="submit" value="发 送" name="B1"> <input type="reset" value="重 写" name="B2"> </font></div> </td> </tr> </フォーム> </テーブル> <表の幅="68%" border="1" cellpadding="4" cellpacing="0" bordercolor="#E3E3E3"> <tr> <td> <表幅="100%" ボーダー="0" セルパディング="0" セルスペース="0"> <form action=manage.php Method=post> <tr> <tdcolspan="2"> <入力タイプ=隠し名=表示フラグ値=表示> 管理秘密コード: <入力タイプ=パスワード名=パスワードサイズ=8> <input type=submit value="确定" name="submit"> </td> </tr> </フォーム> </テーブル> </td> <td> <表幅="100%" ボーダー="0" セルパディング="0" セルスペース="0"> <form action=guest.php method=post> <tr> <td> 请输入关键字: <input type="text" name="keyword" size="10"> <input type="submit" name="search" value="搜索留言"> </td> </tr> </フォーム> </テーブル> </td> </tr> </テーブル> 関数検索($keyword) { グローバル $コンテンツ; $count=カウント($content); $subscript=0; $ArrSearch=array(); for ($i=0;$i <テーブル幅="68%" ボーダー="0"> <tr> <td> $int_page_count=$count;//总条数; $int_page_num=ceil($int_page_count/$one_page_line);//总页数; echo "<font color="#CC33FF">分页:"; for ($i=1;$i </td><td><p align=right>共有<font color=red><?echo "$count"?></font>条</p></td> ; </tr> </テーブル> </div> <br> <表の幅="68%" border="0" align="center"> if ($page=="" または !isset($page)) {$page=1;} $text=""; $begin_line=$int_page_count-($page-1)*$one_page_line; if ($begin_line($begin_line-$one_page_line);$j--) { $text=$text."<tr><td align=right Colspan=2><a href=reply.php?job=reply&record=".$j.">回复</a> <a href=edit.php?record=".$j.">编辑</a> <a href=dele.php?record=".$j.">删除</ a> 第<font color=red>$j</font>条</td></tr>"; $text.=$content[$j-1]; //数组找下标从0开始。 } 「$text」をエコーします。 ?> </テーブル> include('bottom.htm'); ?> </ボディ> </html> <div class="clear"></div></font></tdcolspan>