首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

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

2012-12-29 
大虾们帮我解释一段代码 谢谢!! 小弟初学。。Set FsoServer.CreateObject(Scripting.FilesystemObject)On

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

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文件。

热点排行