惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
Spread Privacy
Spread Privacy
T
Threatpost
C
Cisco Blogs
P
Palo Alto Networks Blog
AI
AI
Cyberwarzone
Cyberwarzone
NISL@THU
NISL@THU
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
T
Tor Project blog
Latest news
Latest news
AWS News Blog
AWS News Blog
D
Docker
S
SegmentFault 最新的问题
博客园 - 聂微东
WordPress大学
WordPress大学
Vercel News
Vercel News
S
Securelist
爱范儿
爱范儿
J
Java Code Geeks
Know Your Adversary
Know Your Adversary
S
Schneier on Security
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
Last Week in AI
Last Week in AI
D
DataBreaches.Net
宝玉的分享
宝玉的分享
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
K
Kaspersky official blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
量子位
博客园_首页
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
腾讯CDC
T
Threat Research - Cisco Blogs
雷峰网
雷峰网
有赞技术团队
有赞技术团队
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
S
Security Affairs

博客园 - 胡枫

ASP.NET URL Rewrite. URL重写 asp.net 中DataGrid自定义分页(简单,实用,易懂) 实现类似textarea这样可以滚动显示内容的方法 各种浏览器CSS hack方法 HTML+CSS+JS学习笔记 JS学习笔记ZT Asp.net 备份、还原Ms SQLServer及压缩Access数据库 我该怎样卸载IE7? ASP.NET Application,Session,Cookie和ViewState等对象用法和区别 (转) ASP.NET 防注入的两个通用函数 innerText,outerText,innerHTML,outerHTML 如何在TextBox控件中显示系统当前时间?包括:年、月、日、时、分 ASP.NET 防注入的两个通用函数 C# 操作ACCESS数据库 ASP判断是否包含字符串(InStr 函数) asp.net2.0中Repeater的分页使用 ASP.NET2.0下含有DropDownList的GridView编辑、删除的完整例子! 一个GridView编辑删除的例子 asp.net中没有类似asp中Left()函数怎么办?
ASP读取显示TXT文件内容
胡枫 · 2007-12-23 · via 博客园 - 胡枫

<html><head><title>基于文本的消息发布系统</title></head>
<body>
<table border="1" cellspacing="0" cellpadding="1" bordercolorlight="#dfdfdf" bordercolordark="#ffffff" align="center">
<tr bgcolor="#cccce6">
<td algin="center" colspan="2">最新消息</td>
</tr>
<%
Set fso=Server.CreateObject("ing.FileSystemObject")
Set fp=fso.OpenTextFile(Server.MapPath("message.txt"))
'打开message.txt

Do While fp.AtEndOfStream<>true
s
=fp.ReadLine '读取一条数据

p
=Instr(s,"*"'取得*号的位置
Messagetitle=Mid(s,1,p-1'取得*号前边的字符串(消息标题)
s=Mid(s,p+1,Len(s)-p) '设变量s为*号后边的字符串

p
=Instr(s,"*")
MessageUrl
=Mid(s,1,p-1'取得*号后边的字符串(链接地址)
s=Mid(s,p+1,Len(s)-p)

ttime

='设定消息发布时间ttime为s
%>
<tr><td><href='<%=MessageUrl%>'><%=Messagetitle%></a></td>
<td><%=ttime%></td>
</tr>
<!--生成表格,把消息显示出来-->
<%
Loop
Fp.close
Set fp=Nothing
Set fso=Nothing
%>
</table>
</body></html>

简单的方法

<%
dim fso,f
    
set fso=server.CreateObject("Scripting.FileSystemObject")
    
Set f =  fso.OpenTextFile(Server.MapPath("1.txt"),1)  
    
Do  While  Not  f.AtEndOfStream    
    response.write f.readline
    
loop
    f.close
    
set f=nothing
    
set fso=nothing
%>