当前位置: 代码迷 >> ASP >> 们帮小弟我解释一段代码 多谢! 小弟初学。
  详细解决方案

们帮小弟我解释一段代码 多谢! 小弟初学。

热度:80   发布时间:2012-12-29 10:28:09.0
大虾们帮我解释一段代码 谢谢!! 小弟初学。。
Set Fso=Server.CreateObject("Scripting.FilesystemObject")
On Error Resume Next
Set objFolder=fso.GetFolder(server.MapPath("../skins/"& template &"/asp/"))
Set objFiles=objFolder.Files
For Each objFile In objFiles
Lebi_Variable = Lebi_Variable &"<!--#include file="""& Fatherpath &"skins/"& template &"/asp/"& objFile.name &"""-->"&vbcrlf
Next 
Set objFolder=Nothing
Set fso=Nothing

------解决方案--------------------
Set Fso=Server.CreateObject("Scripting.FilesystemObject")//创建fso对象
        On Error Resume Next//强制运行
        Set objFolder=fso.GetFolder(server.MapPath("../skins/"& template &"/asp/"))//获取文件夹对象
        Set objFiles=objFolder.Files//获取文件夹下的所有文件
        For Each objFile In objFiles//循环所有文件
                Lebi_Variable = Lebi_Variable &"<!--#include file="""& Fatherpath &"skins/"& template &"/asp/"& objFile.name &"""-->"&vbcrlf//拼成代码
        Next 
        Set objFolder=Nothing//注销
        Set fso=Nothing//注销
------解决方案--------------------
好像动态生成一些asp文件。
  相关解决方案