<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="ASP常见代码（3）" id="card1">
<p> 游客</p><p>
标题:ASP常见代码（3）<br/>
正文:<br/>
 120	&amp;quot;ASP常见代码（3）	&amp;quot;dim&amp;amp;nbsp;fso,f,temparray,tempcnt&amp;quot;	&amp;quot;ASP常见代码（3）18.使用FSO读取文件某一行的函数function FSOlinedit(filename,lineNum)if linenum &amp;lt; 1 then exit functiondim fso,f,temparray,tempcntset fso = server.CreateObject(&amp;quot;scripting.filesystemobject&amp;quot;)if not fso.fileExists(server.mappath(filename)) then exit functionset f = fso.opentextfile(server.mappath(filename),1)if not f.AtEndofStream thentempcnt = f.readallf.closeset f = nothingtemparray = split(tempcnt,chr(13)&amp;amp;chr(10))ubound(temparray)+1 thenexit functionelseFSOlinedit = temparray(lineNum-1)end ifend ifend function19.使用FSO写文件某一行的函数function FSOlinewrite(filename,lineNum,Linecontent)if linenum &amp;lt; 1 then exit functiondim fso,f,temparray,tempCntset fso = server.CreateObject(&amp;quot;scripting.filesystemobject&amp;quot;)if not fso.fileExists(server.mappath(filename)) then exit functionset f = fso.opentextfile(server.mappath(filename),1)if not f.AtEndofStream thentempcnt = f.readallf.closetemparray = split(te<br/><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=273&amp;Page=1">[&lt;&lt;]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=273&amp;Page=1">[[1]]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=273&amp;Page=2">[2]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=273&amp;Page=3">[3]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=273&amp;Page=3">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=273">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=273">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://www.zhongguosou.com/blog/wap.asp">首页</a>
</p>
</card>
</wml>