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是不能够重启服务器的,这时我们需要制作一个组件来实现功能,ASP通过这个组件调用系统API,然后按照不同的重启和关机方
- delete 删除一张大表时空间不释放,非常慢是因为占用大量的系统资源,支持回退操作,空间还被这张表占用着。truncate table 表
- 表示文字链接最清楚的方式是“蓝色文字+下划线”,这是在浏览器发展过程中形成的。这个问题大家都说过很多次了,我也曾经说过。然而,这样的规范却总
- sql2000安全很重要将有安全问题的SQL过程删除.比较全面.一切为了安全!删除了调用shell,注册表,COM组件的破坏权限use&nb
- 计算分页,嘿嘿一次搞定不用判断intNumPage = Abs(Int(-(intNumRecord/intPerPage)))  
- 是因工作需要做的一个批量修改代码的小东西,拿出来与大家分享。 目前可以处理的文件类型:.asp .inc .htm .html
- 品牌是我们一直挂在嘴边的词语,视觉设计师们经常说到,公司的品牌该如何如何去设计?这个违背了我们的公司品牌!等等。之前我有谈过关于 品牌灵魂的
- 对很多从事产品工作的同事来说,“以用户为中心”是工作的重点,同时也是难点。用户的心思难以捉摸,用户研究的工作也似乎高深莫测。不过,用户研究并
- <SCRIPT language="JavaScript"><!-- Beginfunction mo
- 例如:将日期格式为2009-6-8的转换为2009-06-08,给小于10的数字补上一个0方法一:year(now)
- 在使用ORACLE的过程过,我们会经常遇到一些ORACLE产生的错误,对于初学者而言,这些错误可能有点模糊,而且可能一时不知怎么去处理产生的
- 代码如下:Class Vector Private vector_datas() Private&n
- 今天是五一劳动节,可是我们劳动人民的节日哦。很多大网站都设计了特殊的logo来表示向每一位普通的劳动者致敬!下面就让我们看看这些logo吧!
- 个人觉得还是不要使用中文作为文件名的好,虽然我们用的语言是中文,毕竟中文容易出现问题,兼容性不好。用Dreamweaver制作网页时,如果插
- http://validator.w3.org/#validate_by_upload 在线校验网址点浏览,上次找到自己做的页面
- 现在主流的cms或者blog等系统中,都内置的有插件系统,但是层层深入、剖析实现的方式,其实都是最简单的钩子的复杂化的实现。前言钩子是插件执
- 在 Internet 连接无处不在的今天,我们忽然有了另外一个需求,离线 Web。Gmail, Google Reader, Zoho 这些
- 现在很多以内容为核心的网站上都在文章底部添加了社会化分享按钮,能让浏览用户在发现一篇有价值的文章时,可以通过社会化网络快速分享给自己的好友,
- 写了个简洁的隔行变色代码,支持三种动作变化颜色<!DOCTYPE html PUBLIC "-//W3C//DTD XHTM
- 关于Ajax在使用中要使浏览器产生前进后退的方法,网上比较多的方法有两种:一是采用hash值的方式,这是我们在地图preview版中使用的方