asp如何做一个专门显示文本文件的页面?

时间:2010-07-12 19:04:00 

如何做一个专门显示文本文件的页面?

    代码如下:
txt.asp

<html>
<head>
<title><%fn=request.querystring("fn") pointposition=instrrev(fn,".") hn=left(fn,pointposition-1) %></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
BODY{font-size: 9pt ;}
td {font-size: 9pt ;}
P  {font-size: 9pt ;}
font {font-size: 9pt ;}
A:link {color:teal; font-style: normal; text-decoration: none; cursor: hand}
A:visited {color: teal; font-style: normal; text-decoration: none}
A:active {color: rgb(155,55,0); font-style: normal; text-decoration: none}
A:hover {color: red; font-style:bold; text-decoration:underline}  
TABLE {font-family:宋体;font-size:9pt;color:#000000}
INPUT {font-family:宋体;font-size:9pt;color:#000000}
TEXTAREA {font-family:宋体;font-size:9pt;color:#000000}
-->
</style>
</head>
<body bgcolor="#EBA9DB">
<table width="100%" border="0" align="center">
  <tr>
    <td width="100%" height="105" valign="top"><dl>
    <dd align="center"><br>
    <div align="center"><center><table border="0" cellspacing="0" width="600" height="152">
    <tr>
    <td height="59"><p align="center">精彩春风之TXT文本显示 </font></td>
    <td height="14"></td>
    </tr>
    <tr>
<td width="642" height="1" bgcolor="#FFFFFF">
<table width="100%" border="0" align="center" bgcolor="#D0F7E7" height="92">
    <tr>
<td width="90%" height="88">
<%
fn="/intels/chunfeng/txt/"&fn
Set fs = Server.CreateObject("Scripting.FileSystemObject")
set thefile=fs.opentextfile(server.mappath(fn),1,false)
nr=thefile.readall
%>
<pre><%=nr%></pre>
<p>
<%
thefile.close
%> 
</td>
</tr>
</table>
</td>
</tr>
    <tr>
    <td height="14"></td>
    </tr>
    /table>
    </center></div></dd>
    <div align="center"><center><table border="0" cellpadding="0" cellspacing="3" width="689">
    <tr>
    <td width="355"></td>
    <td nowrap width="18"><span style="font-size: 10pt"><a href="javascript:history.back()">
<img  border="0" hspace="3" width="11" height="11"></a></span></td>
    <td nowrap width="65"><a href="javascript:window.history.back()"
    style="COLOR: rgb(128,128,128)"><font color="#000000"><span style="font-size: 10pt">返回上一页</span></font></a></td>
    <td nowrap valign="top" width="15"><a href="javascript:window.scroll(0,0)"><span
style="font-size: 10pt"><img border="0" hspace="3" width="11" height="11">
</span></a></td>
    <td nowrap width="99"><font color="#000000"><span style="font-size: 10pt">返回首页</span></font></td>
    </tr>
    </table>
    </center></div>
    </dl>
    </td>
    </tr>
</table>
</body>
</html>
<noscript>

标签:文本,asp
0
投稿

猜你喜欢

  • 九宫格基本布局

    2009-06-18 18:36:00
  • 一个不错的js+css二级分类菜单代码

    2007-12-28 21:22:00
  • oblog4.6转换ucenterHome1.5过程全记录,提供老用户无法登陆的补丁

    2009-10-29 12:04:00
  • asp无组件备份与还原数据库

    2007-09-24 13:19:00
  • ASP自动解压RAR文件代码

    2007-11-06 13:29:00
  • CSS应用的必要步骤:样式重设

    2008-06-11 13:29:00
  • 如何把数据从SQL Server导出到Access或Excel中去?

    2009-11-02 20:26:00
  • 合并SQL脚本文件的方法分享

    2011-09-30 11:13:03
  • SQL Server 中死锁产生的原因及解决办法

    2008-11-25 11:50:00
  • PHP正则表达式替换<pre>标签外的内容

    2023-05-22 10:47:12
  • 打造设计你自己的字体 Ⅱ

    2008-03-14 07:48:00
  • 符合标准的纯CSS三 级弹出菜单

    2008-01-06 15:34:00
  • Oracle数据仓库的分层管理器解决方案开发者网络Oracle

    2010-07-16 13:08:00
  • 群组功能和用户沟通

    2009-07-19 14:07:00
  • 判断字段是否被更新 新旧数据写入Audit Log表中

    2012-01-29 17:56:33
  • Atlas—微软的Ajax工具包

    2007-09-07 09:52:00
  • 实际应用:MySQL5存储过程编写

    2008-11-11 12:25:00
  • 向上不间断(无缝)滚动图片js代码

    2007-09-24 20:22:00
  • 图片变形扭曲特效js脚本

    2008-11-20 12:57:00
  • Oracle如何直接运行OS命令(下)第1/2页

    2010-07-30 13:26:00
  • asp之家 网络编程 m.aspxhome.com