asp如何在本地机器上创建缓存?
时间:2010-06-18 19:27:00
如何在本地机器上创建缓存?
用法到是很简单,只需先创建Stream对象的实例,然后开始写入数据即可:
Dim str As ADODB.Stream
Set str = New ADODB.Stream
str.Open
str.WriteText "Asp之家"
str.WriteText "——致力于为asp学习者提供动力"
str.WriteText "http://www.aspxhome.com", adWriteLine
str.WriteText "精彩春风之创建缓存演示"
str.WriteText "我们使用Stream对象来创建", adWriteLine
MsgBox "缓存中共有" & _
str.Size & "个字符"
str.Position = 0
MsgBox "缓存内容: " & str.ReadText
str.Close
其实,我们还可以用Stream对象来处理二进制数据。只需用Write和Read方法取代操作文本的WriteText和ReadText方法。
把数据放入缓存之后,我们就可用SaveToFile方法永久保存数据了。
标签:Stream,adode,缓存
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
在go文件服务器加入http.StripPrefix的用途介绍
2023-06-26 07:19:07
![](https://img.aspxhome.com/file/2023/1/92031_0s.jpg)
python机器学习实战之最近邻kNN分类器
2021-11-11 14:55:52
django queryset 去重 .distinct()说明
2022-10-12 01:01:00
PyQt5爬取12306车票信息程序的实现
2023-05-18 05:03:08
![](https://img.aspxhome.com/file/2023/8/70028_0s.jpg)
Pyqt5 实现跳转界面并关闭当前界面的方法
2023-02-02 13:59:19
scrapy头部修改的方法详解
2023-09-13 05:58:10
![](https://img.aspxhome.com/file/2023/0/82720_0s.png)
Collatz 序列、逗号代码、字符图网格实例
2023-07-27 10:24:31
mysql5.7创建用户授权删除用户撤销授权
2024-01-22 17:52:11
仿谷歌主页js动画效果实现代码
2024-04-17 10:07:36
讲解Python中fileno()方法的使用
2022-06-28 06:16:12
nodejs基础知识
2024-05-13 09:30:32
Python调用Zoomeye搜索接口的实现
2021-08-26 03:59:24
![](https://img.aspxhome.com/file/2023/7/107177_0s.png)
vuex中使用对象展开运算符的示例
2024-05-28 15:59:44
python Django的web开发实例(入门)
2022-01-09 17:48:33
![](https://img.aspxhome.com/file/2023/4/124684_0s.png)
网页特效文字之—沙粒字
2023-07-06 07:32:10
![](https://img.aspxhome.com/file/UploadPic/20072/2007231168817s.jpg)
smarty缓存用法分析
2024-06-07 15:44:41
不安全的js写法
2009-09-16 14:26:00
解决python matplotlib imshow无法显示的问题
2023-07-19 23:59:25
基于python实现文件加密功能
2022-02-02 20:28:57
![](https://img.aspxhome.com/file/2023/7/86657_0s.jpg)
python实现excel和csv中的vlookup函数示例代码
2021-05-06 07:22:48
![](https://img.aspxhome.com/file/2023/0/109850_0s.png)