讀文本文件中的一個(gè)部分
代碼:
<!DOCTYPE html><html>
<body>
<p>This is the first five characters from the text file:</p>
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)
Response.Write(f.Read(5))
f.Close
Set f=Nothing
Set fs=Nothing
%>
</body>
</html>
結(jié)果:
This is the first five characters from the text file:
Hello
相關(guān)文章
- ASP操作數(shù)據(jù)庫(kù)的類
- 不錯(cuò)的主要用于加密的vbs(asp)位移運(yùn)算類
- JavaScript面向?qū)ο蟮膬煞N書寫方法以及差別
- ASPJPEG綜合操作的CLASS類
- ASP面向?qū)ο缶幊烫接懠氨容^
- Access 2000 數(shù)據(jù)庫(kù) 80 萬(wàn)記錄通用快速分頁(yè)類
- ASP語(yǔ)法高亮類代碼
- VBS、ASP代碼語(yǔ)法加亮顯示的類
- 文章列表類別
- newasp中下載類
- 查詢翻頁(yè)優(yōu)化第1/2頁(yè)
- 檢測(cè)函數(shù) asp class
- ASP中一個(gè)字符串處理類
- Object對(duì)象的一些的隱藏函數(shù)介紹
- 文件、目錄,文本文件等多種操作類
- 淺談ASP中的類
- [ASP]使用類,實(shí)現(xiàn)模塊化
- 一個(gè)簡(jiǎn)單的asp數(shù)據(jù)庫(kù)操作類
- ASP類Class入門 推薦
- 分頁(yè)類,異常類