仓酷云

标题: ASP编程:Web资本办理器(保留为恣意ASP文件便可)... [打印本页]

作者: 只想知道    时间: 2015-1-16 22:14
标题: ASP编程:Web资本办理器(保留为恣意ASP文件便可)...
缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全web<styletype="text/css">
<!--
a{
font-size:9pt;
color:#3300CC;
text-decoration:none;
}
body{
font-size:9pt;
margin-left:0px;
margin-top:0px;
margin-right:0px;
margin-bottom:0px;
line-height:20px;
background-color:#EEEEEE;
}
td{
font-size:9pt;
line-height:20px;
}
.tx{
border-color:#000000;
border-left-width:0px;
border-top-width:0px;
border-right-width:0px;
border-bottom-width:1px;
font-size:9pt;
background-color:#EEEEEE;
}
.tx1{
font-size:9pt;
border:1pxsolid;
border-color:#000000;
color:#000000;
}
-->
</style>
<%版权声明:本代码仅供进修研讨之用,自己不合错误因利用本程序而酿成的任何成果卖力。未经作者书面允许不得用于贸易用处。
QQ:103895
email:quxiaohui_0@163.com
http://asp2004.net
Server.ScriptTimeout=999
action=Request("action")
temp=Split(Request.ServerVariables("URL"),"/")
url=temp(UBound(temp))
Constpass="asp2004.net"上岸暗码
上岸考证
CallChkLogin()
Setfso=CreateObject("Scripting.FileSystemObject")
SelectCaseaction
Case"新建文件"
Callfileform(Request("path")&"")
Case"savefile"
Callsavefile(Request("filename"),Request("content"),Request("filename1"))
Case"新建文件夹"
Callnewfolder(Request("path")&"")
Case"savefolder"
Callsavefolder(Request("foldername"))
Case"编纂"
Calledit(Request("f"))
Case"重定名"
Callrenameform(Request("f"))
Case"saverename"
Callrename(Request("oldname"),Request("newname"))
Case"剪切"
session("f")=request("f")
session("action")=action
Response.Redirect(url&"?foldername="&Request("path"))
Case"复制"
session("f")=request("f")
session("action")=action
Response.Redirect(url&"?foldername="&Request("path"))
Case"粘贴"
Callaffix(Request("path")&"")
Case"删除"
CallDelete(request("f"),Request("path"))
Case"uploadform"
Calluploadform(Request("filepath"),Request("path"))
Case"saveupload"
Callsaveupload()
Case"下载"
Calldownload(request("f"))
Case"打包"
DimStr,s,s1,s2,rep
CallDabao(Request("f"),Request("path"))
Case"解包"
CallJiebao(Request("f"),Request("path"))
Case"加入"
Calllogout()
CaseElse
Path=Request("foldername")
IfPath=""ThenPath=server.MapPath("./")
ShowFolderList(Path)
EndSelect
Setfso=Nothing
列出文件和文件夹
FunctionShowFolderList(folderspec)
temp=Request.ServerVariables("HTTP_REFERER")
temp=Left(temp,Instrrev(temp,"/"))
temp1=Len(folderspec)-Len(server.MapPath("./"))-1
Iftemp1>0Then
temp1=Right(folderspec,CInt(temp1))+""
ElseIftemp1=-1Then
temp1=""
EndIf
tempurl=temp+Replace(temp1,"","/")
uppath="./"+Replace(temp1,"","/")
upfolderspec=fso.GetParentFolderName(folderspec&"")
Setf=fso.GetFolder(folderspec)
%>
<formname="form1"method=postaction="">
<inputtype="hidden"name="path"class="tx1"value="<%=folderspec%>">
<inputtype="submit"name="action"class="tx1"value="新建文件夹">
<inputtype="submit"name="action"class="tx1"value="新建文件">
<inputtype="button"value="向上"class="tx1"","")%>">
<inputtype="button"value="前往"class="tx1">
<inputtype="submit"name="action"class="tx1"value="重定名">
<inputtype="submit"name="action"class="tx1"value="编纂">
<inputtype="submit"name="action"class="tx1"value="剪切">
<inputtype="submit"name="action"class="tx1"value="复制">
<inputtype="submit"name="action"class="tx1"value="粘贴"<%ifsession("f")=""orisnull(session("f"))thenresponse.write("disabled")%>>
<inputtype="submit"name="action"class="tx1"value="删除">
<inputtype="button"name="action"class="tx1"value="上传"","")%>,new_page,width=600,height=260,left=100,top=100,scrollbars=auto);returnfalse;">
<inputtype="submit"name="action"class="tx1"value="下载">
<inputtype="submit"name="action"class="tx1"value="打包">
<inputtype="submit"name="action"class="tx1"value="解包">
<inputtype="submit"name="action"class="tx1"value="加入">
<br>以后目次:<%=f.path%>以后工夫:<%=now%>
<tablewidth="100%"height="24"border="1"cellpadding="0"cellspacing="0"bordercolor="#FFFFFF"bordercolorlight="#FFFFFF"bordercolordark="#000000">
<trbgcolor="#CCCCCC">
<tdwidth="4%"align="center">操纵<inputtype="checkbox"name="chkall"></td>
<tdwidth="42%"align="center">称号</td>
<tdwidth="11%"align="right">巨细<%=formatnumber(f.size/1024,2)%>K</td>
<tdwidth="20%"align="center">范例</td>
<tdwidth="13%">修正工夫</td>
<tdwidth="10%">属性</td>
</tr>
<%
列出目次
Setfc=f.SubFolders
ForEachf1infc
%>
<trbgcolor="#EEEEEE"onmou搜索引擎优化ver=this.bgColor=#F3F6FA;onmou搜索引擎优化ut=this.bgColor=#EEEEEE;>
<td><center><inputtype="checkbox"name="f"value="<%=folderspec&""&f1.name%>"></center></td>
<td><ahref="<%=url%>?foldername=<%=folderspec%><%=f1.name%>"><%=f1.name%></a></td>
<tdalign="right"><%=f1.size%></td>
<td><%=f1.type%></td>
<td><%=f1.datelastmodified%></td>
<td><%=f1.Attributes%></td>
</tr>
<%
Next
列出文件
Setfc=f.Files
ForEachf1infc
%>
<trbgcolor="#EFEFEF"onmou搜索引擎优化ver=this.bgColor=#F3F6FA;onmou搜索引擎优化ut=this.bgColor=#EEEEEE;>
<td><center><inputtype="checkbox"name="f"value="<%=folderspec&""&f1.name%>"></center></td>
<td><ahref="<%=tempurl+f1.name%>"target="_blank"><%=f1.name%></a></td>
<tdalign="right"><%=f1.size%></td>
<td><%=f1.type%></td>
<td><%=f1.datelastmodified%></td>
<td><%=f1.Attributes%></td>
</tr>
<%
Next
%>
</table>
</form>
<%
EndFunction
保留文件
Functionsavefile(filename,content,filename1)
IfRequest.ServerVariables("PATH_TRANSLATED")filenameThen
Setf1=fso.OpenTextFile(filename,2,true)
f1.Write(content)
f1.Close
EndIf
Response.Redirect(url&"?foldername="&fso.GetParentFolderName(filename))
EndFunction
文件表单
Functionfileform(filename)
Iffso.FileExists(filename)Then
Setf1=fso.OpenTextFile(filename,1,true)
content=server.HTMLEncode(f1.ReadAll)
f1.Close
EndIf
%>
<formname="form1"method="post"action="<%=url%>?action=savefile">
<center><inputname="filename"type="text"class="tx"style="width:100%"value="<%=filename%>"><textareaname="content"wrap="VIRTUAL"class="tx"style="width:100%;height:100%;font:Arial,Helvetica,sans-serif;"onKeyUp="style.height=this.scrollHeight;"><%=content%></textarea><inputtype="submit"class="tx1"value="保留"><inputtype="reset"class="tx1"value="重置"></center>
</form>
<%
EndFunction
保留文件夹
Functionsavefolder(foldername)
Setf=fso.CreateFolder(foldername)
Response.Redirect(url&"?foldername="&f)
EndFunction
新文件夹
Functionnewfolder(foldername)
folderformfoldername
EndFunction
文件夹表单
Functionfolderform(foldername)
%>
<formmethod="post"action="<%=url%>?action=savefolder">
<center><inputname="foldername"type="text"size="100"value="<%=foldername%>"><inputtype="submit"class="tx1"value="保留"><inputtype="reset"class="tx1"value="重置"></center>
</form>
<%
EndFunction
重定名表单
Functionrenameform(oldname)
%>
<formmethod=postaction="">
<center>输出新的名字:<inputtype="hidden"name="oldname"value=<%=oldname%>><inputtype="hidden"name="action"value="saverename"><inputtype="text"name="newname"value=<%=oldname%>size="100"><inputtype="submit"class="tx1"value="提交修正"></center>
</form>
<%
EndFunction
重定名
FunctionRename(oldstr,newstr)
oldname=Split(oldstr,",")
newname=Split(newstr,",")
Fori=0ToUBound(oldname)
Iffso.FileExists(Trim(oldname(i)))Thenfso.MoveFileTrim(oldname(i)),Trim(newname(i))
Iffso.FolderExists(Trim(oldname(i)))Thenfso.MoveFolderTrim(oldname(i)),Trim(newname(i))
Next
Response.Redirect(url&"?foldername="&fso.GetParentFolderName(oldname(0)))
EndFunction
粘贴
Functionaffix(Path)
oldname=Split(session("f"),",")
Ifsession("action")="剪切"Then
Fori=0ToUBound(oldname)
Iffso.FileExists(Trim(oldname(i)))Thenfso.MoveFileTrim(oldname(i)),Path&fso.GetFileName(Trim(oldname(i)))
Iffso.FolderExists(Trim(oldname(i)))Thenfso.MoveFolderTrim(oldname(i)),Trim(Path)
Next
ElseIfsession("action")="复制"Then
Fori=0ToUBound(oldname)
Iffso.FileExists(Trim(oldname(i)))Thenfso.CopyFileTrim(oldname(i)),Path&fso.GetFileName(Trim(oldname(i)))
Iffso.FolderExists(Trim(oldname(i)))Thenfso.CopyFolderTrim(oldname(i)),Trim(Path)
Next
EndIf
session("f")=""
Response.Redirect(url&"?foldername="&Path)
EndFunction
编纂
Functionedit(f)
Iffso.FileExists(f)ThenCallfileform(f)
Iffso.FolderExists(f)ThenCallfolderform(f)
EndFunction
删除
FunctionDelete(Str,Path)
ForEachfInStr
Iffso.FileExists(f)Thenfso.DeleteFile(f)
Iffso.FolderExists(f)Thenfso.DeleteFolder(f)
Next
Response.Redirect(url&"?foldername="&Path)
EndFunction
打包
FunctionDabao(Str,Path)
ForEachfInStr
Iffso.FolderExists(f)ThenCallpack(f,Path&"")
Next
Response.Redirect(url&"?foldername="&Path)
EndFunction
解包
FunctionJiebao(Str,Path)
ForEachfInStr
Iffso.FileExists(f)AndInStrRev(f,".asp2004")>0AndLen(f)-InStrRev(f,".asp2004")=7ThenInstall(f)
Next
Response.Redirect(url&"?foldername="&Path)
EndFunction
上传表单
Functionuploadform(filepath,Path)
%>
<divid="waitting"style="position:absolute;top:100px;left:240px;z-index:10;visibility:hidden">
<tableborder="0"cellspacing="1"cellpadding="0"bgcolor="0959AF">
<tr><tdbgcolor="#FFFFFF"align="center">
<tablewidth="160"border="0"height="50">
<tr><tdvalign="top"><divalign="center">操作执行中<br>请稍候...</div></td></tr>
</table>
</td></tr>
</table>
</div>
<divid="upload"style="visibility:visible">
<formname="form1"method="post"action="<%=url%>?action=saveupload"enctype="multipart/form-data">
<tablewidth="100%"height="24"border="1"cellpadding="0"cellspacing="0"bordercolor="#FFFFFF"bordercolorlight="#FFFFFF"bordercolordark="#000000">
<trbgcolor="#CCCCCC"><tdbgcolor="#CCCCCC">文件上传
<inputtype="hidden"name="act"value="upload"></td>
</tr>
<tralign="left"bgcolor="#EEEEEE"><td>
<li>必要上传的个数:<inputname="upcount"class="tx"value="1"><inputtype="button"class="tx1"value="设定">
<li>上传到:<inputname="filepath"class="tx"value="<%=filepath%>"size="60"><inputname="path"class="tx"size="60"value="<%=path%>"style="display=none">利用相对路径<inputname="ispath"type="checkbox"value="true">
<li>避免掩盖主动重定名<inputname="checkbox"type="checkbox"value="true"checked>
<li>暗码:<inputname="uppass"type="password"class="tx">
</td></tr>
<tr><tdalign="left"id="upid"></td></tr>
<trbgcolor="#EEEEEE"><tdalign="center"bgcolor="#EEEEEE">
<inputtype="submit"class="tx1"value="提交">
<inputtype="reset"class="tx1"value="重置">
<inputtype="button"class="tx1"value="作废">
</td></tr>
</table>
</form></div>
<scriptlanguage="JavaScript">
functionexec()
{
waitting.style.visibility="visible";
upload.style.visibility="hidden";
}
functionsetid()
{
if(window.form1.upcount.value>0)
{
str=;
for(i=1;i<=window.form1.upcount.value;i++)
str+=文件+i+:<inputtype="file"name="file+i+"style="width:400"class="tx1"><br>;
window.upid.innerHTML=str+;
}
}
setid();
</script>
<%
EndFunction
保留上传
Functionsaveupload()
Constfiletype=".bmp.gif.jpg.png.rar.zip.txt."同意上传的文件范例。以.分开
ConstMaxSize=5000000同意的文件巨细
Dimupload,File,formName,formPath
Setupload=Newupload_5xsoft
Ifupload.Form("filepath")""Then
Ifupload.Form("ispath")="true"Then
formPath=upload.Form("path")
Else
formPath=Server.mappath(upload.Form("filepath"))
EndIf
IfRight(formPath,1)""ThenformPath=formPath&""
Iffso.FolderExists(formPath)trueThen
fso.CreateFolder(formPath)
EndIf
ForEachformNameinupload.objFile
SetFile=upload.File(formName)
temp=Split(File.FileName,".")
fileExt=temp(UBound(temp))
IfInStr(1,filetype,LCase(fileExt))>0Orupload.Form("uppass")=passThen
Ifupload.Form("checkbox")="true"Then
Randomize
ranNum=Int(90000*Rnd)+10000
filename=Year(Now)&Right("0"&Month(Now),2)&Right("0"&Day(Now),2)&Right("0"&Hour(Now),2)&Right("0"&Minute(Now),2)&Right("0"&Second(Now),2)&ranNum&"."&fileExt
Else
temp=Split(File.FileName,"")
filename=temp(Ubound(temp))
EndIf
IfFile.FileSize>0And(File.FileSize<MaxSizeOrupload.Form("uppass")=pass)Then
File.SaveAsformPath&filename
EndIf
SetFile=Nothing
EndIf
Next
EndIf
Response.Write("<scriptlanguage=javascript>window.opener.location.reload();self.close();</script>")
Setupload=Nothing
EndFunction
下载文件
Functiondownload(File)
temp=Split(File,"")
filename=temp(UBound(temp))
Sets=CreateObject("adodb.stream")
s.mode=3
s.Type=1
s.Open
s.loadfromfile(File)
data=s.Read
IfIsNull(data)Then
response.Write"空"
Else
response.Clear
Response.ContentType="application/octet-stream"
Response.AddHeader"Content-Disposition","attachment;filename="&filename
response.binarywrite(data)
EndIf
Sets=Nothing
EndFunction
打包
Functionpack(Folder,Path)
Randomize
ranNum=Int(90000*Rnd)+10000
Setf1=fso.GetFolder(Folder)
filename=Year(Now)&Month(Now)&Day(Now)&Hour(Now)&Minute(Now)&Second(Now)&ranNum&"_"&f1.Size
Sets=server.CreateObject("ADODB.Stream")
Sets1=server.CreateObject("ADODB.Stream")
Sets2=server.CreateObject("ADODB.Stream")
s.Open
s1.Open
s2.Open
s.Type=1
s1.Type=1
s2.Type=2
rep=fso.GetParentFolderName(Folder&"")以后目次
Str="folder>0>"&Replace(Folder,rep,"")&vbCrLf连目次一同打包
CallWriteFile(Folder)
s2.charset="gb2312"
s2.WriteText(Str)
s2.Position=0
s2.Type=1
s2.Position=0
bin=s2.Read
s1.Write(bin)
s1.SetEOS
s1.SaveToFile(Path&filename&".asp2004")
s.Close
s1.Close
s2.Close
Sets=Nothing
Sets1=Nothing
Sets2=Nothing
EndFunction
FunctionWriteFile(folderspec)
Setf=fso.GetFolder(folderspec)
Setfc=f.Files
ForEachf1infc
Iff1.Name"pack.asp"Then
Str=Str&"file>"&f1.Size&">"&Replace(folderspec&""&f1.Name,rep,"")&vbCrLf
s.LoadFromFile(folderspec&""&f1.Name)
img=s.Read()
IfNotIsNull(img)Thens1.Write(img)
EndIf
Next
Setfc=f.SubFolders
ForEachf1infc
Str=Str&"folder>0>"&Replace(folderspec&""&f1.Name,rep,"")&vbCrLf
WriteFile(folderspec&""&f1.Name)
Next
EndFunction
解包
Functioninstall(filename)
tofolder=fso.GetParentFolderName(filename)
t1=Split(filename,"")失掉文件全名
t2=Split(t1(UBound(t1)),".")失掉文件名
t3=Split(t2(0),"_")失掉数据巨细
Size=CStr(t3(1))
Sets=server.CreateObject("adodb.stream")
Sets1=server.CreateObject("adodb.stream")
Sets2=server.CreateObject("adodb.stream")
s.Open
s1.Open
s2.Open
s.Type=1
s1.Type=1
s2.Type=1
s.loadfromfile(filename)
s.position=Size
s1.Write(s.Read)
s1.position=0
s1.Type=2
s1.charset="gb2312"
s1.position=0
a=Split(s1.readtext,vbCrLf)
s.position=0
i=0
While(i<UBound(a))
b=Split(a(i),">")
Ifb(0)="folder"Then
IfNotfso.FolderExists(tofolder&b(2))Then
fso.CreateFolder(tofolder&b(2))
folder=split(tofolder&b(2),"")主动创建分层目次
forj=0toubound(folder)
newfolder=newfolder&folder(j)&""
ifnotfso.folderexists(newfolder)then
fso.createfolder(newfolder)
endif
next
EndIf
ElseIfb(0)="file"Then
Iffso.FileExists(tofolder&b(2))Then
fso.DeleteFile(tofolder&b(2))
EndIf
s2.position=0
data=s.Read(b(1))
IfNotIsNull(data)thens2.Write(data)
s2.seteos
s2.savetofile(tofolder&b(2))
EndIf
i=i+1
Wend
s.Close
s1.Close
s2.Close
Sets=Nothing
Sets1=Nothing
Sets2=Nothing
Response.Write("<scriptlanguage=javascript>window.opener.location.reload();self.close();</script>")
EndFunction
反省上岸
FunctionChkLogin()
IfSession("login")="true"Then
ExitFunction
ElseIfRequest("action")="chklogin"Then
Server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
Server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
IfServer_v1""AndMid(Server_v1,8,Len(Server_v2))=Server_v2Then
IfRequest("password")=passThen
Session("login")="true"
Response.Redirect(url)
Else
Response.Write("<script>alert(上岸失利);</script>")
EndIf
EndIf
EndIf
CallLoginForm()
EndFunction
上岸表单
FunctionLoginForm()
%>
<body>
<br><br><br><br><br>
<formname="form1"method="post"action="<%=url%>?action=chklogin">
<center>请输出暗码:<inputname="password"type="password"class="tx">
<inputtype="submit"class="tx1"value="上岸">
<br><br><br><br><br><br>
版权一切:<ahref="http://Asp2004.net"target="_blank">http://<fontcolor=red>A</font>sp2004.net</a>
</center>
</form>
</body>
<%
Response.End()
EndFunction
刊出
Functionlogout()
Session.Abandon()
Response.Redirect(url)
EndFunction
%>
<SCRIPTRUNAT=SERVERLANGUAGE=VBSCRIPT>
dimData_5xsoft
Classupload_5xsoft
dimobjForm,objFile,Version
PublicfunctionForm(strForm)
strForm=lcase(strForm)
ifnotobjForm.exists(strForm)then
Form=""
else
Form=objForm(strForm)
endif
endfunction
PublicfunctionFile(strFile)
strFile=lcase(strFile)
ifnotobjFile.exists(strFile)then
setFile=newFileInfo
else
setFile=objFile(strFile)
endif
endfunction
PrivateSubClass_Initialize
dimRequestData,sStart,vbCrlf,sInfo,iInfoStart,iInfoEnd,tStream,iStart,theFile
dimiFileSize,sFilePath,sFileType,sFormValue,sFileName
dimiFindStart,iFindEnd
dimiFormStart,iFormEnd,sFormName
Version="化境HTTP上传程序Version2.0"
setobjForm=Server.CreateObject("Scripting.Dictionary")
setobjFile=Server.CreateObject("Scripting.Dictionary")
ifRequest.TotalBytes<1thenExitSub
settStream=Server.CreateObject("adodb.stream")
setData_5xsoft=Server.CreateObject("adodb.stream")
Data_5xsoft.Type=1
Data_5xsoft.Mode=3
Data_5xsoft.Open
Data_5xsoft.WriteRequest.BinaryRead(Request.TotalBytes)
Data_5xsoft.Position=0
RequestData=Data_5xsoft.Read
iFormStart=1
iFormEnd=LenB(RequestData)
vbCrlf=chrB(13)&chrB(10)
sStart=MidB(RequestData,1,InStrB(iFormStart,RequestData,vbCrlf)-1)
iStart=LenB(sStart)
iFormStart=iFormStart+iStart+1
while(iFormStart+10)<iFormEnd
iInfoEnd=InStrB(iFormStart,RequestData,vbCrlf&vbCrlf)+3
tStream.Type=1
tStream.Mode=3
tStream.Open
Data_5xsoft.Position=iFormStart
Data_5xsoft.CopyTotStream,iInfoEnd-iFormStart
tStream.Position=0
tStream.Type=2
tStream.Charset="gb2312"
sInfo=tStream.ReadText
tStream.Close
iFormStart=InStrB(iInfoEnd,RequestData,sStart)
iFindStart=InStr(22,sInfo,"name=""",1)+6
iFindEnd=InStr(iFindStart,sInfo,"""",1)
sFormName=lcase(Mid(sinfo,iFindStart,iFindEnd-iFindStart))
ifInStr(45,sInfo,"filename=""",1)>0then
settheFile=newFileInfo
iFindStart=InStr(iFindEnd,sInfo,"filename=""",1)+10
iFindEnd=InStr(iFindStart,sInfo,"""",1)
sFileName=Mid(sinfo,iFindStart,iFindEnd-iFindStart)
theFile.FileName=getFileName(sFileName)
theFile.FilePath=getFilePath(sFileName)
iFindStart=InStr(iFindEnd,sInfo,"Content-Type:",1)+14
iFindEnd=InStr(iFindStart,sInfo,vbCr)
theFile.FileType=Mid(sinfo,iFindStart,iFindEnd-iFindStart)
theFile.FileStart=iInfoEnd
theFile.FileSize=iFormStart-iInfoEnd-3
theFile.FormName=sFormName
ifnotobjFile.Exists(sFormName)then
objFile.addsFormName,theFile
endif
else
tStream.Type=1
tStream.Mode=3
tStream.Open
Data_5xsoft.Position=iInfoEnd
Data_5xsoft.CopyTotStream,iFormStart-iInfoEnd-3
tStream.Position=0
tStream.Type=2
tStream.Charset="gb2312"
sFormValue=tStream.ReadText
tStream.Close
ifobjForm.Exists(sFormName)then
objForm(sFormName)=objForm(sFormName)&","&sFormValue
else
objForm.AddsFormName,sFormValue
endif
endif
iFormStart=iFormStart+iStart+1
wend
RequestData=""
settStream=nothing
EndSub
PrivateSubClass_Terminate
ifRequest.TotalBytes>0then
objForm.RemoveAll
objFile.RemoveAll
setobjForm=nothing
setobjFile=nothing
Data_5xsoft.Close
setData_5xsoft=nothing
endif
EndSub
PrivatefunctionGetFilePath(FullPath)
IfFullPath""Then
GetFilePath=left(FullPath,InStrRev(FullPath,""))
Else
GetFilePath=""
EndIf
Endfunction
PrivatefunctionGetFileName(FullPath)
IfFullPath""Then
GetFileName=mid(FullPath,InStrRev(FullPath,"")+1)
Else
GetFileName=""
EndIf
Endfunction
EndClass
ClassFileInfo
dimFormName,FileName,FilePath,FileSize,FileType,FileStart
PrivateSubClass_Initialize
FileName=""
FilePath=""
FileSize=0
FileStart=0
FormName=""
FileType=""
EndSub
PublicfunctionSaveAs(FullPath)
dimdr,ErrorChar,i
SaveAs=true
iftrim(fullpath)=""orFileStart=0orFileName=""orright(fullpath,1)="/"thenexitfunction
setdr=CreateObject("Adodb.Stream")
dr.Mode=3
dr.Type=1
dr.Open
Data_5xsoft.position=FileStart
Data_5xsoft.copytodr,FileSize
dr.SaveToFileFullPath,2
dr.Close
setdr=nothing
SaveAs=false
endfunction
EndClass
</SCRIPT>
使用filesystemobject,可以对服务器上的文件进行操作,浏览、复制、移动、删除等。有ado的支持,asp对数据库的操作非常得心应手。你甚至可以像使用本地数据库那样,管理远程主机上的数据库,对表格、记录进行各种操作。
作者: 小魔女    时间: 2015-1-18 13:33
跟学别的语言一样,先掌握变量,流程控制语句(就是ifwhileselect)等,函数/过程,数组
作者: 老尸    时间: 2015-1-22 05:52
兴趣爱好,那么你无须学编程,申请一个域名和空间,在网上下载一些免费开源的CMS系统,你不用改代码,只须熟悉它们的后台操作,像office一样简单方便,很快就能建一个站点,很多站长都是这样做的
作者: 只想知道    时间: 2015-1-30 23:21
不是很难但是英文要有一点基础网上的教程很少有系统的详细的去买书吧,另不用专门学习vb关于vbscript脚本在asp教材都有介绍
作者: 兰色精灵    时间: 2015-2-6 16:48
运用经典的例子。并且自己可以用他来实现一些简单的系统。如果可以对他进行进一步的修改,找出你觉得可以提高性能的地方,加上自己的设计,那就更上一个层次了,也就会真正地感到有所收获。
作者: 仓酷云    时间: 2015-2-17 12:22
代码逻辑混乱,难于管理:由于ASP是脚本语言混合html编程,所以你很难看清代码的逻辑关系,并且随着程序的复杂性增加,使得代码的管理十分困难,甚至超出一个程序员所能达到的管理能力,从而造成出错或这样那样的问题。
作者: 莫相离    时间: 2015-3-5 19:47
代码的可重用性差:由于是面向结构的编程方式,并且混合html,所以可能页面原型修改一点,整个程序都需要修改,更别提代码重用了。
作者: 小妖女    时间: 2015-3-12 13:31
ASP.Net摆脱了以前ASP使用脚本语言来编程的缺点,理论上可以使用任何编程语言包括C++,VB,JS等等,当然,最合适的编程语言还是MS为.NetFrmaework专门推出的C(读csharp),它可以看作是VC和Java的混合体吧。
作者: 飘飘悠悠    时间: 2015-3-19 22:36
Request:从字面上讲就是“请求”,因此这个是处理客户端提交的东东的,例如Resuest.Form,Request.QueryString,或者干脆Request("变量名")




欢迎光临 仓酷云 (http://ckuyun.com/) Powered by Discuz! X3.2