|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我想详细了解ASP整站代码与PSP整站代码有什么优缺点,那个更好,更安全,更用容易维护,和管理。。。函数|驱动器|数组|下拉|下拉列表|函数|驱动器|数组|下拉|下拉列表<TITLE>NewDocument</TITLE>
<METANAME="Generator"CONTENT="EditPlus">
<METANAME="Author"CONTENT="">
<METANAME="Keywords"CONTENT="">
<METANAME="Description"CONTENT="">
<style>
body{text-align:left;font:12px#000080;}
#main{float:left;width:680px;border:#0000ff1pxsolid;margin:5px20px;padding:10px100px;}
#mainp{}
</style>
</HEAD>
<BODY>
<divid="main">
<%
OptionExplicit
selectcaserequest("actionname")
case"查找"
callfind(request("dirname"))
case"进进"
callenterdir(request("dirname"))
caseotherwise
callshowmain()
endselect
actionarray=storearrayvalue("查找,搜刮,走吧,进进",",")
drvname=split(showdrivelist,",")
response.write"<formname=drvaction=find.asp>"
response.writewriteselect(actionarray,actionname)
response.writewriteselect(drvname,dirname)
response.write"<inputtype=submitname=actionvalue=入手下手></form>"
此函数用来给数组赋值,arrayvalue为要赋的字符串值,splitmethod为支解此字符串的根据
Functionstorearrayvalue(arrayvalue,splitmethod)
storearrayvalue=split(arrayvalue,splitmethod)
Endfunction
此函数前往下拉列表字符串,arrayname为传进的数组称号,sltname为此下拉列表的称号
Functionwriteselect(arrayname,sltname)
dimslt,i
slt="<selectname="&sltname&">"
fori=0toubound(arrayname)
slt=slt&"<optionvalue="&arrayname(i)&">"&arrayname(i)&"</option>"
next
slt=slt&"</select>"
writeselect=slt
Endfunction
此函数前往一切驱动器
FunctionShowDriveList
Dimfso,d,dc,i,s
Setfso=CreateObject("Scripting.FileSystemObject")
Setdc=fso.Drives
i=0
ForEachdindc
s=s&d.driveletter&","
i=i+1
Next
s=mid(s,1,len(s)-1)
showdrivelist=s
EndFunction
此历程输入所选驱动器的容量情况.
showdriveinfo("e:")
SubShowDriveInfo(drvPath)
Dimfso,drv,s
Setfso=CreateObject("Scripting.FileSystemObject")
Setdrv=fso.GetDrive(fso.GetDriveName(drvPath))
s="Drive"&UCase(drvPath)&"-"
s=s&drv.VolumeName&"<br/>"
s=s&"TotalSpace:"&FormatNumber(drv.TotalSize/(1024*1024*1024),-1)
s=s&"GB"&"<br/>"
s=s&"FreeSpace:"&FormatNumber(drv.FreeSpace/(1024*1024*1024),-1)
s=s&"GB"&"<br/>"
Response.Writes
EndSub
%>
</div>
</body>
</html>
</p>ASP是依赖组件的,能访问数据库的组件好多就有好多种,再有就是你微软的工具可是什么都要收钱的啊! |
|