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

推荐订阅源

IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
小众软件
小众软件
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
J
Java Code Geeks
WordPress大学
WordPress大学
The Cloudflare Blog

博客园 - 黄毅.net

获取oracle 表字段,表名,以及主键之类等等的信息。 关于.net操作Oracle数据库,parameters参数顺序的问题。 .net 处理xml 查找节点 属性 添加节点 - 黄毅.net js显示日期 - 黄毅.net - 博客园 Jmail组件使用方法(asp) access存储和读取二进制字段数据 如何让数据库排序的时候按照中文的拼音来排序 flash不合js冲突(js菜单会飘到flash下面) & 不剪断代码透明化 - 黄毅.net DateAdd函数使用方法 【winform】datagridview绑定到arraylist的时候,arraylist元素变化而dgv不变的解决。 treeview显示数据表树结构。 读取硬盘id (这个好像仅限于ide硬盘) 播放器嵌入代码 url传递中文的解决方案总结 Js验证是否为数字 执行完asp,然后把html写进静态页面(功能类型于spider,还是xmlhttp的) 一个分页的sp,从aspnetpager过来的 网站测试技术简介 验证email正则js
asp读写txt操作 - 黄毅.net - 博客园
黄毅.net · 2007-07-31 · via 博客园 - 黄毅.net

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

  <%  
  'dim strTextContent
'Sub ReadFiles()  
If Trim(Request("Action"))="Write" Then
    objstr = "Scripting."&"FileSystemObject"
    Set objFSO = CreateObject(objstr)
 fo=Server.MapPath("index.asp")
 Set objText = objFSO.CreateTextFile(fo,True)
 objText.Write Trim(Request("textarea"))
 objtext.Close
End If
Dim objFSO   
Dim objText   
Dim ObjFile   
Dim strTextContent   
Dim objDrive   
'创建一个文件操作对象实例 
objstr = "Scripting."&"FileSystemObject" 
Set objFSO = CreateObject(objstr)   
'要打开的文件   
ObjFile = "/index.asp"  
ObjFile=server.mappath(ObjFile)   
'Response.write ObjFile   
'Response.end   
IF objFSO.FileExists(ObjFile) then    
  '打开TXT文件,并赋值给变量   
  Response.Write "文件存在"
  Set objText = objFSO.OpenTextFile(ObjFile,1)   
  'strTextContent = objText.ReadAll()   
  '循环读取数据   
While not objText.AtEndOfStream '到文件的末尾   
'While not objText.AtEndOfLine '到一行的末尾   
   strTextContent = strTextContent&objText.ReadLine()   
   'response.write strTextContent    
   'response.write "<br>"   
  wend   
  Call objText.Close   
else   
    strTextContent= "文件不存在"  
    response.end   
end if   
'End Sub    
'调用过程读取文件   
'readfiles()   
%>  


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="?Action=Write">
  <textarea name="textarea" cols="80" rows="20"><%=strTextContent%>
</textarea>
  <input type="submit" name="Submit" value="提交" />
</form>
</body>
</html>