asp.个人主页留言薄的制作,没有数据库的,用*.txt形式的。测试有问题,大伙帮我测下。 ( 积分: 30 )

  • 主题发起人 主题发起人 wxhn
  • 开始时间 开始时间
W

wxhn

Unregistered / Unconfirmed
GUEST, unregistred user!
个人主页留言薄的制作
*文件名:book.htm  
<html>
<head>
<title>留言薄</title>
</head>
<body bgcolor=&quot;#BED9FC&quot;
background=&quot;images/bg.gif&quot;>
<p align=&quot;center&quot;><img src=&quot;images/gbook.gif&quot;
alt=&quot;GBook.gif (12142 bytes)&quot;
WIDTH=&quot;374&quot;HEIGHT=&quot;83&quot;> </p>
<p align=&quot;center&quot;>[<a href=&quot;disp.asp&quot;>我要看留言板</a>]&amp;nbsp;
[<a href=&quot;../index.asp&quot;>返回首页</a>]</p>
<form method=&quot;POST&quot;
action=&quot;book.asp&quot;>
<input type=&quot;hidden&quot;
name=&quot;task&quot;
value=&quot;insert&quot;><div align=&quot;left&quot;><table>
<tr>
<td align=&quot;right&quot;>姓名</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;name&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>性别</td>
<td><img src=&quot;images/bottom-g.gif&quot;
alt=&quot;BUTTOM-G.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;sex&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>来自</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;from&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>主页URL</td>
<td><img src=&quot;images/homepage.gif&quot;
alt=&quot;HomePage.gif (1232 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;url&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
E-mail</td>
<td><img src=&quot;images/email.gif&quot;
alt=&quot;Email.gif (1197 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;email&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>留言</td>
<td colspan=&quot;2&quot;><textarea wrap=&quot;off&quot;
name=&quot;comments&quot;
cols=&quot;49&quot;
rows=&quot;9&quot;></textarea></td>
</tr>
<tr>
<td>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
</td>
<td colspan=&quot;2&quot;><dl>
<dd align=&quot;center&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;submit&quot;
value=&quot;我写好了&quot;>
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;reset&quot;
value=&quot;重新再写&quot;></dd>
</dl>
</td>
</tr>
</table>
</div>
</form>
<p align=&quot;center&quot;> </p>
</body>
</html>


*book.asp
<% @language=&quot;vbscript&quot;
%>
<%
if Request.ServerVariables(&quot;REQUEST_METHOD&quot;)=&quot;POST&quot;
then
set fsFilesys=CreateObject(&quot;Scripting.FileSystemObject&quot;)
‘打开文本文件server.mappath(&quot;/&quot;)是返回服务器发行目录的真实路径,也就是比如说:c:/Inetpub/wwwroot这个路径,
然后&quot;/realchat/book/book.txt&quot;就是相对于这个路径基础上的路径。
set myText=fsFilesys.OpenTextFile(Server.MapPath(&quot;/&quot;)&amp;&quot;/realchat/book/book.txt&quot;)
Temp=myText.Readall
myText.Close
if Request(&quot;task&quot;)=&quot;insert&quot;
then
Tname=request.form(&quot;name&quot;)
Tsex=request.form(&quot;sex&quot;)
Temail=request.form(&quot;email&quot;)
turl=request.form(&quot;url&quot;)
Tfrom=request.form(&quot;from&quot;)
Tcomments=request.form(&quot;comments&quot;)
Ttime=&quot;#&amp;@&quot;&amp;time
if Len(Tcomments)<2 then
%>
<font size=&quot;4&quot;
color=&quot;red&quot;>
<p align=&quot;center&quot;>对不起!你还未留言。<a href=&quot;book.asp&quot;>返回</a></font> <%
else
if Lcase(Left(Turl,7))<>&quot;http://&quot;
then
Turl=&quot;http://&quot;&amp;Turl
End if
Turl=Lcase(Turl)
set myText=fsFilesys.CreateTextFile(Server.MapPath(&quot;/&quot;)&amp;&quot;/realchat/book/book.txt&quot;)
myText.WriteLine(Tname)
myText.WriteLine(Tsex)
myText.WriteLine(Temail)
myText.WriteLine(Turl)
myText.WriteLine(Tfrom)
myText.WriteLine(Tcomments)
myText.writeLine(Ttime)
myText.WriteLine(date)
myText.writeLine(Temp)
myText.Close
%>
<script Language=&quot;JavaScript&quot;>
document.write(&quot;<h1>恭喜!您的留言已顺利提交,请按<a href='disp.asp'>这里</a>查看&quot;)
</script>
<%
end if
End if
else
%>
<html>
<head>
<title>留言薄</title>
<% colorbg=&quot;#BED9FC&quot;
%>
</head>
<body bgcolor=&quot;<% =colorbg %>&quot;
background=&quot;images/bg.gif&quot;>
<p align=&quot;center&quot;><img src=&quot;images/gbook.gif&quot;
alt=&quot;GBook.gif (12142 bytes)&quot;
WIDTH=&quot;374&quot;
HEIGHT=&quot;83&quot;> </p>
<p align=&quot;center&quot;>[<a href=&quot;disp.asp&quot;>我要看留言板</a>]&amp;nbsp;
[<a href=&quot;../index.asp&quot;>返回首页</a>]</p>
<form method=&quot;POST&quot;
action=&quot;book.asp&quot;>
<input type=&quot;hidden&quot;
name=&quot;task&quot;
value=&quot;insert&quot;><div align=&quot;left&quot;><table>
<tr>
<td align=&quot;right&quot;>姓名</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;name&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>性别</td>
<td><img src=&quot;images/bottom-g.gif&quot;
alt=&quot;BUTTOM-G.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;sex&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>来自</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;from&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>主页URL</td>
<td><img src=&quot;images/homepage.gif&quot;
alt=&quot;HomePage.gif (1232 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;url&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
E-mail</td>
<td><img src=&quot;images/email.gif&quot;
alt=&quot;Email.gif (1197 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;email&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>留言</td>
<td colspan=&quot;2&quot;><textarea wrap=&quot;off&quot;
name=&quot;comments&quot;
cols=&quot;49&quot;
rows=&quot;9&quot;></textarea></td>
</tr>
<tr>
<td>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
</td>
<td colspan=&quot;2&quot;><dl>
<dd align=&quot;center&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;submit&quot;
value=&quot;我写好了&quot;>
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;reset&quot;
value=&quot;重新再写&quot;></dd>
</dl>
</td>
</tr>
</table>
</div>
</form>
<p align=&quot;center&quot;> </p>
</body>
</html>
<%
end if
%>

  现在到disp.asp这个文件,这个文件主要完成从book.txt中提取文件内容,然后重新生成HTML代码以显示出留言内容。
代码如下:
<% @language=&quot;vbscript&quot;
%>
<html>
<head>
<title>留言薄</title>
</head>
<body background=&quot;images/back.gif&quot;>
<p align=&quot;center&quot;><img src=&quot;images/gbook.gif&quot;
alt=&quot;gbook.gif (12142 bytes)&quot;
WIDTH=&quot;374&quot;
HEIGHT=&quot;83&quot;><%
set fsFilesys=CreateObject(&quot;Scripting.FileSystemObject&quot;)
set myText=fsFilesys.OpenTextFile(Server.MapPath(&quot;/&quot;)&amp;&quot;/realchat/book/book.txt&quot;)
Tname=myText.ReadLine
%> </p>
<p align=&quot;center&quot;>[<font color=&quot;#00FFFF&quot;
size=&quot;4&quot;><a href=&quot;book.asp&quot;>我要写留言</a></font>][<font color=&quot;#00FFFF&quot;><a href=&quot;../index.asp&quot;>返回首页</a></font>]</p>
<table width=&quot;600&quot;>
<%
do while Tname<>&quot;Line1&quot;
Tsex=myText.ReadLine
Temail=myText.ReadLine
Turl=myText.ReadLine
Tfrom=myText.ReadLine
%>
<tr>
<td><hr>
</td>
</tr>
<tr>
<th colspan=&quot;2&quot;
align=&quot;left&quot;>姓&amp;nbsp;&amp;nbsp;&amp;nbsp;名:<% =Tname %><br>
性&amp;nbsp;&amp;nbsp;&amp;nbsp;别:<% =Tsex %><br>
E—mail:<a href=&quot;mailto:<% =Temail %>&quot;><% =Temail %></a><br>
主页URL:<a href=&quot;<% =Turl %>&quot;
target=&quot;_blank&quot;><% =turl %></a><br>
来&amp;nbsp;&amp;nbsp;&amp;nbsp;自:<% =Tfrom %></th>
</tr>
<tr>
<th align=&quot;left&quot;
bgcolor=&quot;<% =colorbg %>&quot;><font color=&quot;red&quot;>留&amp;nbsp;&amp;nbsp;&amp;nbsp;言:</font></th>
<th align=&quot;left&quot;
bgcolor=&quot;<% =colorbg %>&quot;><%
Tcomments=myText.ReadLine
do while InStr(Tcomments,&quot;#&amp;@&quot;)=0
%>
<% =Tcomments %>
<br>
<%
Tcomments=myText.ReadLine
loop
Ttime=Mid(Tcomments,4)
Tdate=myText.ReadLine
%> </th>
</tr>
<tr>
<th colspan=&quot;2&quot;
align=&quot;left&quot;>时&amp;nbsp;&amp;nbsp;&amp;nbsp;间:<% =Ttime %> <br>
日&amp;nbsp;&amp;nbsp;&amp;nbsp;期:<% =Tdate %></th>
</tr>
<tr>
<td><br>
<%
tname=myText.ReadLine
loop
myText.Close
%> </td>
</tr>
</table>
<p><br>
<br>
</p>
</body>
</html>
*book.txt的内容,里面有一条留言
小Hu

realplay@163.net
http://realplay.163.net
佛山
热烈兴祝“泰信心动聊天室虚拟社区”进入测试使用阶断,衷
心感谢些您的到来,在测试过程中有什么问题或好的建议,请
告诉我。
网络之门系列站点诚邀您的加盟参与!
 
个人主页留言薄的制作
*文件名:book.htm  
<html>
<head>
<title>留言薄</title>
</head>
<body bgcolor=&quot;#BED9FC&quot;
background=&quot;images/bg.gif&quot;>
<p align=&quot;center&quot;><img src=&quot;images/gbook.gif&quot;
alt=&quot;GBook.gif (12142 bytes)&quot;
WIDTH=&quot;374&quot;HEIGHT=&quot;83&quot;> </p>
<p align=&quot;center&quot;>[<a href=&quot;disp.asp&quot;>我要看留言板</a>]&amp;nbsp;
[<a href=&quot;../index.asp&quot;>返回首页</a>]</p>
<form method=&quot;POST&quot;
action=&quot;book.asp&quot;>
<input type=&quot;hidden&quot;
name=&quot;task&quot;
value=&quot;insert&quot;><div align=&quot;left&quot;><table>
<tr>
<td align=&quot;right&quot;>姓名</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;name&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>性别</td>
<td><img src=&quot;images/bottom-g.gif&quot;
alt=&quot;BUTTOM-G.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;sex&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>来自</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;from&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>主页URL</td>
<td><img src=&quot;images/homepage.gif&quot;
alt=&quot;HomePage.gif (1232 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;url&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
E-mail</td>
<td><img src=&quot;images/email.gif&quot;
alt=&quot;Email.gif (1197 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;email&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>留言</td>
<td colspan=&quot;2&quot;><textarea wrap=&quot;off&quot;
name=&quot;comments&quot;
cols=&quot;49&quot;
rows=&quot;9&quot;></textarea></td>
</tr>
<tr>
<td>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
</td>
<td colspan=&quot;2&quot;><dl>
<dd align=&quot;center&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;submit&quot;
value=&quot;我写好了&quot;>
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;reset&quot;
value=&quot;重新再写&quot;></dd>
</dl>
</td>
</tr>
</table>
</div>
</form>
<p align=&quot;center&quot;> </p>
</body>
</html>


*book.asp
<% @language=&quot;vbscript&quot;
%>
<%
if Request.ServerVariables(&quot;REQUEST_METHOD&quot;)=&quot;POST&quot;
then
set fsFilesys=CreateObject(&quot;Scripting.FileSystemObject&quot;)
‘打开文本文件server.mappath(&quot;/&quot;)是返回服务器发行目录的真实路径,也就是比如说:c:/Inetpub/wwwroot这个路径,
然后&quot;/realchat/book/book.txt&quot;就是相对于这个路径基础上的路径。
set myText=fsFilesys.OpenTextFile(Server.MapPath(&quot;/&quot;)&amp;&quot;/realchat/book/book.txt&quot;)
Temp=myText.Readall
myText.Close
if Request(&quot;task&quot;)=&quot;insert&quot;
then
Tname=request.form(&quot;name&quot;)
Tsex=request.form(&quot;sex&quot;)
Temail=request.form(&quot;email&quot;)
turl=request.form(&quot;url&quot;)
Tfrom=request.form(&quot;from&quot;)
Tcomments=request.form(&quot;comments&quot;)
Ttime=&quot;#&amp;@&quot;&amp;time
if Len(Tcomments)<2 then
%>
<font size=&quot;4&quot;
color=&quot;red&quot;>
<p align=&quot;center&quot;>对不起!你还未留言。<a href=&quot;book.asp&quot;>返回</a></font> <%
else
if Lcase(Left(Turl,7))<>&quot;http://&quot;
then
Turl=&quot;http://&quot;&amp;Turl
End if
Turl=Lcase(Turl)
set myText=fsFilesys.CreateTextFile(Server.MapPath(&quot;/&quot;)&amp;&quot;/realchat/book/book.txt&quot;)
myText.WriteLine(Tname)
myText.WriteLine(Tsex)
myText.WriteLine(Temail)
myText.WriteLine(Turl)
myText.WriteLine(Tfrom)
myText.WriteLine(Tcomments)
myText.writeLine(Ttime)
myText.WriteLine(date)
myText.writeLine(Temp)
myText.Close
%>
<script Language=&quot;JavaScript&quot;>
document.write(&quot;<h1>恭喜!您的留言已顺利提交,请按<a href='disp.asp'>这里</a>查看&quot;)
</script>
<%
end if
End if
else
%>
<html>
<head>
<title>留言薄</title>
<% colorbg=&quot;#BED9FC&quot;
%>
</head>
<body bgcolor=&quot;<% =colorbg %>&quot;
background=&quot;images/bg.gif&quot;>
<p align=&quot;center&quot;><img src=&quot;images/gbook.gif&quot;
alt=&quot;GBook.gif (12142 bytes)&quot;
WIDTH=&quot;374&quot;
HEIGHT=&quot;83&quot;> </p>
<p align=&quot;center&quot;>[<a href=&quot;disp.asp&quot;>我要看留言板</a>]&amp;nbsp;
[<a href=&quot;../index.asp&quot;>返回首页</a>]</p>
<form method=&quot;POST&quot;
action=&quot;book.asp&quot;>
<input type=&quot;hidden&quot;
name=&quot;task&quot;
value=&quot;insert&quot;><div align=&quot;left&quot;><table>
<tr>
<td align=&quot;right&quot;>姓名</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;name&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>性别</td>
<td><img src=&quot;images/bottom-g.gif&quot;
alt=&quot;BUTTOM-G.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;sex&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>来自</td>
<td><img src=&quot;images/bottom-b.gif&quot;
alt=&quot;BUTTOM-B.GIF (179 bytes)&quot;
WIDTH=&quot;16&quot;
HEIGHT=&quot;16&quot;></td>
<td><input name=&quot;from&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>主页URL</td>
<td><img src=&quot;images/homepage.gif&quot;
alt=&quot;HomePage.gif (1232 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;url&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
E-mail</td>
<td><img src=&quot;images/email.gif&quot;
alt=&quot;Email.gif (1197 bytes)&quot;
WIDTH=&quot;30&quot;
HEIGHT=&quot;30&quot;></td>
<td><input name=&quot;email&quot;
size=&quot;46&quot;></td>
</tr>
<tr>
<td align=&quot;right&quot;>留言</td>
<td colspan=&quot;2&quot;><textarea wrap=&quot;off&quot;
name=&quot;comments&quot;
cols=&quot;49&quot;
rows=&quot;9&quot;></textarea></td>
</tr>
<tr>
<td>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
</td>
<td colspan=&quot;2&quot;><dl>
<dd align=&quot;center&quot;>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;submit&quot;
value=&quot;我写好了&quot;>
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
<input type=&quot;reset&quot;
value=&quot;重新再写&quot;></dd>
</dl>
</td>
</tr>
</table>
</div>
</form>
<p align=&quot;center&quot;> </p>
</body>
</html>
<%
end if
%>

  现在到disp.asp这个文件,这个文件主要完成从book.txt中提取文件内容,然后重新生成HTML代码以显示出留言内容。
代码如下:
<% @language=&quot;vbscript&quot;
%>
<html>
<head>
<title>留言薄</title>
</head>
<body background=&quot;images/back.gif&quot;>
<p align=&quot;center&quot;><img src=&quot;images/gbook.gif&quot;
alt=&quot;gbook.gif (12142 bytes)&quot;
WIDTH=&quot;374&quot;
HEIGHT=&quot;83&quot;><%
set fsFilesys=CreateObject(&quot;Scripting.FileSystemObject&quot;)
set myText=fsFilesys.OpenTextFile(Server.MapPath(&quot;/&quot;)&amp;&quot;/realchat/book/book.txt&quot;)
Tname=myText.ReadLine
%> </p>
<p align=&quot;center&quot;>[<font color=&quot;#00FFFF&quot;
size=&quot;4&quot;><a href=&quot;book.asp&quot;>我要写留言</a></font>][<font color=&quot;#00FFFF&quot;><a href=&quot;../index.asp&quot;>返回首页</a></font>]</p>
<table width=&quot;600&quot;>
<%
do while Tname<>&quot;Line1&quot;
Tsex=myText.ReadLine
Temail=myText.ReadLine
Turl=myText.ReadLine
Tfrom=myText.ReadLine
%>
<tr>
<td><hr>
</td>
</tr>
<tr>
<th colspan=&quot;2&quot;
align=&quot;left&quot;>姓&amp;nbsp;&amp;nbsp;&amp;nbsp;名:<% =Tname %><br>
性&amp;nbsp;&amp;nbsp;&amp;nbsp;别:<% =Tsex %><br>
E—mail:<a href=&quot;mailto:<% =Temail %>&quot;><% =Temail %></a><br>
主页URL:<a href=&quot;<% =Turl %>&quot;
target=&quot;_blank&quot;><% =turl %></a><br>
来&amp;nbsp;&amp;nbsp;&amp;nbsp;自:<% =Tfrom %></th>
</tr>
<tr>
<th align=&quot;left&quot;
bgcolor=&quot;<% =colorbg %>&quot;><font color=&quot;red&quot;>留&amp;nbsp;&amp;nbsp;&amp;nbsp;言:</font></th>
<th align=&quot;left&quot;
bgcolor=&quot;<% =colorbg %>&quot;><%
Tcomments=myText.ReadLine
do while InStr(Tcomments,&quot;#&amp;@&quot;)=0
%>
<% =Tcomments %>
<br>
<%
Tcomments=myText.ReadLine
loop
Ttime=Mid(Tcomments,4)
Tdate=myText.ReadLine
%> </th>
</tr>
<tr>
<th colspan=&quot;2&quot;
align=&quot;left&quot;>时&amp;nbsp;&amp;nbsp;&amp;nbsp;间:<% =Ttime %> <br>
日&amp;nbsp;&amp;nbsp;&amp;nbsp;期:<% =Tdate %></th>
</tr>
<tr>
<td><br>
<%
tname=myText.ReadLine
loop
myText.Close
%> </td>
</tr>
</table>
<p><br>
<br>
</p>
</body>
</html>
*book.txt的内容,里面有一条留言
小Hu

realplay@163.net
http://realplay.163.net
佛山
热烈兴祝“泰信心动聊天室虚拟社区”进入测试使用阶断,衷
心感谢些您的到来,在测试过程中有什么问题或好的建议,请
告诉我。
网络之门系列站点诚邀您的加盟参与!
 
后退
顶部