asp政府源碼
❶ 在哪裡可以免費下載下ASP網站的系統源代碼例如企業網站的招聘系統 後台管理系統 產品系統 會員注冊系統
http://down.chinaz.com/class/3_1.htm
我感覺你下別人的最好還是改下吧
如果資料庫 代碼 什麼的都一樣的話
用的時候也不太安全
❷ 怎麼安裝ASP整站源碼
在本地安裝IIS.然後把下載的ASP文件放到WWWROOT目錄下面就OK了.你可以在網上搜一下.很多教程的.你搜如何安裝IIS就行了WINXP的話下載IIS5.1 NT安裝6.0
❸ asp文件上傳:文件上傳 源代碼
<! #include FILE="upload inc" >談如 <% dim upload file formName formPath iCount filename fileExt set upload=new upload_ xSoft 建立上傳對象 formPath="uploadimages/" 在目錄後啟戚加(/) if right(formPath )<>"/" then formPath=formPath&"/" iCount= for each formName in upload file 列出所有上傳了的文件 set file=upload file(formName) 生成一個文件對象 if file filesize< then response write "<font size= ><br>請先選擇你要上傳的圖片[ <a href=# onclick=history go( )>重新上傳</a> ]</font>" response end end if if file filesize> then 含旁啟 response write "<font size= ><br>圖片大小超過了限制[ <a href=# onclick=history go( )>重新上傳</a> ]</font>" response end end if
fileExt=lcase(right(file filename ))
if fileEXT<>" jpg" and fileEXT<>" gif" then response write "<font size= ><br>文件格式只能為jpg和gif格式[ <a href=# onclick=history go( )>重新上傳</a> ]</font>" response end end if randomize ranNum=int( *rnd)+ filename=formPath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&fileExt filename =year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&fileExt if file FileSize> then 如果 FileSize > 說明有文件數據 file SaveAs Server mappath(filename) 保存文件 response write "<script>parent form img value= "&FileName &" </script>"
iCount=iCount+ end if set file=nothing next set upload=nothing 刪除此對象
Response Write "<img src= "&" /UpLoad/UpLoadImages/"&FileName &" onload = DrawImage(this) >" response end %>
下面是upload inc的代碼
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT> dim upfile_ xSoft_Stream Class upload_ xSoft dim Form File Version Private Sub Class_Initialize dim iStart iFileNameStart iFileNameEnd iEnd vbEnter iFormStart iFormEnd theFile dim strDiv mFormName mFormValue mFileName mFileSize mFilePath iDivLen mStr if Request TotalBytes< then Exit Sub set Form=CreateObject("Scripting Dictionary") set File=CreateObject("Scripting Dictionary") set upfile_ xSoft_Stream=CreateObject("Adodb Stream") upfile_ xSoft_Stream mode= upfile_ xSoft_Stream type= upfile_ xSoft_Stream open upfile_ xSoft_Stream write Request BinaryRead(Request TotalBytes) vbEnter=Chr( )&Chr( ) iDivLen=inString( vbEnter)+ strDiv=subString( iDivLen) iFormStart=iDivLen iFormEnd=inString(iformStart strDiv) while iFormStart < iFormEnd iStart=inString(iFormStart "name=""") iEnd=inString(iStart+ """") mFormName=subString(iStart+ iEnd iStart ) iFileNameStart=inString(iEnd+ "filename=""") if iFileNameStart> and iFileNameStart<iFormEnd then iFileNameEnd=inString(iFileNameStart+ """") mFileName=subString(iFileNameStart+ iFileNameEnd iFileNameStart ) iStart=inString(iFileNameEnd+ vbEnter&vbEnter) iEnd=inString(iStart+ vbEnter&strDiv) if iEnd>iStart then mFileSize=iEnd iStart else mFileSize= end if set theFile=new FileInfo theFile FileName=getFileName(mFileName) theFile FilePath=getFilePath(mFileName) theFile FileSize=mFileSize theFile FileStart=iStart+ theFile FormName=FormName file add mFormName theFile else iStart=inString(iEnd+ vbEnter&vbEnter) iEnd=inString(iStart+ vbEnter&strDiv)
if iEnd>iStart then mFormValue=subString(iStart+ iEnd iStart ) else mFormValue="" end if form Add mFormName mFormValue end if
iFormStart=iformEnd+iDivLen iFormEnd=inString(iformStart strDiv) wend End Sub
Private Function subString(theStart theLen) dim i c stemp upfile_ xSoft_Stream Position=theStart stemp="" for i= to theLen if upfile_ xSoft_Stream EOS then Exit for c=ascB(upfile_ xSoft_Stream Read( )) If c > Then if upfile_ xSoft_Stream EOS then Exit for stemp=stemp&Chr(AscW(ChrB(AscB(upfile_ xSoft_Stream Read( )))&ChrB(c))) i=i+ else stemp=stemp&Chr(c) End If Next subString=stemp End function
Private Function inString(theStart varStr) dim i j bt theLen str InString= Str=toByte(varStr) theLen=LenB(Str) for i=theStart to upfile_ xSoft_Stream Size theLen if i>upfile_ xSoft_Stream size then exit Function upfile_ xSoft_Stream Position=i if AscB(upfile_ xSoft_Stream Read( ))=AscB(midB(Str )) then InString=i for j= to theLen if upfile_ xSoft_Stream EOS then inString= Exit for end if if AscB(upfile_ xSoft_Stream Read( ))<>AscB(MidB(Str j )) then InString= Exit For end if next if InString<> then Exit Function end if next End Function
Private Sub Class_Terminate form RemoveAll file RemoveAll set form=nothing set file=nothing upfile_ xSoft_Stream close set upfile_ xSoft_Stream=nothing End Sub Private function GetFilePath(FullPath) If FullPath <> "" Then GetFilePath = left(FullPath InStrRev(FullPath "")) Else GetFilePath = "" End If End function Private function GetFileName(FullPath) If FullPath <> "" Then GetFileName = mid(FullPath InStrRev(FullPath "")+ ) Else GetFileName = "" End If End function
Private function toByte(Str) dim i iCode c iLow iHigh toByte="" For i= To Len(Str) c=mid(Str i ) iCode =Asc(c) If iCode< Then iCode = iCode + If iCode> Then iLow = Left(Hex(Asc(c)) ) iHigh =Right(Hex(Asc(c)) ) toByte = toByte & chrB("&H"&iLow) & chrB("&H"&iHigh) Else toByte = toByte & chrB(AscB(c)) End If Next End function End Class
lishixin/Article/program/net/201311/14198