在IIS5(就是安装了Win2000)中自带了新的ADO 2.5版本尤其
增加了对XML技术的支持,并且带入了许多崭新的技术,这些技术可以
帮助我们实现以前必须要依靠组件或者其它技术才能够实现的功能。
我这里做一个简单的介绍让大家对这个新的Web组合有所了解。
从这可以看出,
学习和掌握XML技术已经迫在眉睫了。欢迎大家到隔壁
的XML
学习园地作客。。。
新技术之一:
ADO中新增加了一个Record对象(别和RecordSet对象混淆了)。。。
它可以操纵服务器上的任何文件。。。
下面是它运用的事例:
<%
Dim recRoot
Dim rsFiles
Set recRoot = Server.CreateObject("ADODB.Record")
'注意打开的URL必须是运行IIS5中或者支持WebDAV服务,
'至于什么是WebDAV请到隔壁去看看把
recRoot.open "", "URL=http://localhost/iis", adModeRead
Response.Write "
" & Chr(13) & Chr(10)
TraverseTree recRoot
Response.Write "
" & Chr(13) & Chr(10)
recRoot.Close
set recRoot = Nothing
Sub TraverseTree(recNode)
Dim rsChildren
Dim recChildNode
Set recChildNode = Server.CreateObject("ADODB.Record")
Response.Write "
" & recNode("RESOURCE_PARSENAME") & Chr(13) & Chr(10)
Set rsChildren = recNode.GetChildren
If Not rsChildren.EOF Then
Response.Write "" & Chr(13) & Chr(10)
While Not rsChildren.EOF
If rsChildren("RESOURCE_ISCOLLECTION") Then
recChildNode.Open rsChildren
TraverseTree recChildNode
recChildNode.Close
Else
Response.Write "- " & rsChildren("RESOURCE_PARSENAME") & Chr(13) & Chr(10)
End If
rsChildren.MoveNext
Wend
Response.Write "
" & Chr(13) & Chr(10)
End If
rsChildren.Close
Set rsChildren = Nothing
Set recChildNode = Nothing
End Sub
%>
考虑到很多人目前没有安装Win2000,所以我把运行结果也给出来了,
大家可以看到代码运行的结果。。。
注意要想得到正确的结果必须要让iis目录可以Directory Browing
- iis
- sdk
- admin
- mkwebsrv.vbs
- mkwebsrv.js
- metabackrest.vbs
- metabackrest.js
- metaback.vbs
- metaback.js
- logenum.vbs
- logenum.js
- asp
- applications
- Session_VBScript.asp
- Session_Jscript.asp
- Application_VBScript.asp
- Application_Jscript.asp
- components
- redirect.asp
- nts_iis.gif
- ie.gif
- clientcap.htm
- BrowserCap_VBScript.asp
- BrowserCap_Jscript.asp
- AdRotator_VBScript.asp
- AdRotator_Jscript.asp
- adrot.txt
- database
- Update_VBScript.asp
- Update_Jscript.asp
- StoredProcedures_VBScript.asp
- StoredProcedures_Jscript.asp
- SimpleQuery_VBScript.asp
- SimpleQuery_Jscript.asp
- MultiScrolling_VBScript.asp
- MultiScrolling_Jscript.asp
- LimitRows_VBScript.asp
- LimitRows_Jscript.asp
- Authors.mdb
- AddDelete_VBScript.asp
- AddDelete_Jscript.asp
- docs
- toolbar.asp
- sampfram.asp
- libcodebrws.inc
- ColorPicker.asp
- CodeBrws.asp
- interaction
- ServerVariables_VBScript.asp
- ServerVariables_Jscript.asp
- Redirect_VBScript.asp
- Redirect_Jscript.asp
- QueryString_VBScript.asp
- QueryString_Jscript.asp
- PopulateForm_VBScript.asp
- PopulateForm_Jscript.asp
- Pics_VBScript.asp
- Pics_Jscript.asp
- Logon_VBScript.asp
- Logon_Jscript.asp
- Form_VBScript.asp
- Form_Jscript.asp
- FileList.txt
- Expire_VBScript.asp
- Expire_Jscript.asp
- Cookie_VBScript.asp
- Cookie_Jscript.asp
- ClientScript_VBScript.asp
- ClientScript_Jscript.asp
- simple
- Variables_VBScript.asp
- Variables_Jscript.asp
- Looping_VBScript.asp
- Looping_Jscript.asp
- Includes_VBScript.asp
- Includes_Jscript.asp
- HeaderInfo.asp
- Functions_VBScript.asp
- Functions_Jscript.asp
- Conditional_VBScript.asp
- Conditional_Jscript.asp
- Arrays_VBScript.asp
- Arrays_Jscript.asp
- transactional
- SimpleTransaction_VBScript.asp
- SimpleTransaction_Jscript.asp
- FundTransfer_VBScript.asp
- homepage
- themes
- gunmetal
- setup.inc
- layout.inc
- layout.css
- gradient.gif
- journal
- setup.inc
- rip3.gif
- rip2_2.gif
- layout.inc
- layout.css
- looseleaf
- setup.inc
- layout.inc
- layout.css
- themes.inc
- theme.inc
- sub.inc
- signbook.asp
- myfiles.asp
- guestbk.asp
- global.asa
- file.gif
- default.asp
- bullet.gif
- global.asa