c*******u 发帖数: 20 | 1 I'm running XP pro with SP1. the following code runs fine
on IIS 5.0, but it won't run on my machine:
<%
Dim fso, mf, fldr
fldr=Server.MapPath(".\valuable_docs\")
Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set mf=fso.GetFolder(fldr)
If (fso.FolderExists(fldr)) Then
msg = fldr & " exists"
Else
msg = fldr & " doesn't exist"
End If
response.write(mf.Size)
%>
when I commented out
Set mf=fso.GetFolder(fldr)
and
response.write(mf.Size)
it will run on my machine
Anyone knows what's wrong | h*****n 发帖数: 439 | 2 shouldn't you do this ?
Set fso=Server.CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(fldr)) Then
msg = fldr & " exists"
Set mf=fso.GetFolder(fldr)
response.write(mf.Size)
Else
msg = fldr & " doesn't exist"
End If
【在 c*******u 的大作中提到】 : I'm running XP pro with SP1. the following code runs fine : on IIS 5.0, but it won't run on my machine: : <% : Dim fso, mf, fldr : fldr=Server.MapPath(".\valuable_docs\") : Set fso=Server.CreateObject("Scripting.FileSystemObject") : Set mf=fso.GetFolder(fldr) : If (fso.FolderExists(fldr)) Then : msg = fldr & " exists" : Else
|
|