<html>
<body>
<%@ Language=VBScript ENABLESESSIONSTATE = False%>
<form Name="sushant" method="post" action="sushant.asp">
<select id="selFiles" name="selFiles" class="Select" style="width: 250px" tabindex="130">
<%
Dim fso, folder, files
Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set folder=fso.GetFolder("C:\")
Set files=folder.Files
For each folderIdx In files
Re开发者_高级运维sponse.Write("<option>" + folderIdx.Name + "</option>")
Next
%>
</select>
</body>
</html>
i am trying this code by giving its link in another file. but on execution IE shows an error in line set fso=Server.createobject..... i am trying but i could not locate the error. can anyone help me out. sorry for the formatting issue.
Generally, you'll get that error if the system cant find the registerd object. Give
regsvr32 %windir%\system32\scrrun.dll
a go, and see if it sorts you out.
I've also seen the problem,specifically with the FSO, on a server with AV software that seemed to block it, so check this out too.
精彩评论