欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
ASP圖片上傳
一個(gè)圖片上傳ASP,沒(méi)有大小縮略圖,也沒(méi)有水印..縮略圖的代碼可以加,水印需要組件..
<%
ExtName = "jpg,gif,bmp" '允許擴展名
SavePath = "upload" '保存路徑
If Right(SavePath,1)<>"/" Then SavePath=SavePath&"/" '在目錄后加(/)

CheckAndCreateFolder(SavePath)

UpLoadAll_a = Request.TotalBytes '取得客戶(hù)端全部?jì)热?br>
If (UpLoadAll_a>0) Then
  Set UploadStream_c = Server.CreateObject("ADODB.Stream")
  UploadStream_c.Type = 1
  UploadStream_c.Open
  UploadStream_c.Write Request.BinaryRead(UpLoadAll_a) 
  UploadStream_c.Position = 0

  FormDataAll_d = UploadStream_c.Read
  CrLf_e = chrB(13)&chrB(10)
  FormStart_f = InStrB(FormDataAll_d,CrLf_e)
  FormEnd_g = InStrB(FormStart_f+1,FormDataAll_d,CrLf_e)

  Set FormStream_h = Server.Createobject("ADODB.Stream")
  FormStream_h.Type = 1
  FormStream_h.Open
  UploadStream_c.Position = FormStart_f + 1
  UploadStream_c.CopyTo FormStream_h,FormEnd_g-FormStart_f-3
  FormStream_h.Position = 0
  FormStream_h.Type = 2
  FormStream_h.CharSet = "GB2312"
  FormStreamText_i = FormStream_h.Readtext
  FormStream_h.Close

  FileName_j = Mid(FormStreamText_i,InstrRev(FormStreamText_i,"\")+1,FormEnd_g)

  If (CheckFileExt(FileName_j,ExtName)) Then
  SaveFile = Server.MapPath(SavePath & UserFaceName(right(FileName_j,3)))

  If Err Then
  Response.Write "文件上傳: <span style=""color:red;"">文件上傳出錯!</span> <a href=""" & 

Request.ServerVariables("URL") &""">重新上傳文件</a><br />"
  Err.Clear
  Else
  SaveFile = CheckFileExists(SaveFile)
  k=Instrb(FormDataAll_d,CrLf_e&CrLf_e)+4
  l=Instrb(k+1,FormDataAll_d,leftB(FormDataAll_d,FormStart_f-1))-k-2
  FormStream_h.Type=1
  FormStream_h.Open
  UploadStream_c.Position=k-1
  UploadStream_c.CopyTo FormStream_h,l
  FormStream_h.SaveToFile SaveFile,2
   
  SaveFileName = Mid(SaveFile,InstrRev(SaveFile,"\")+1)
  Saver="upload/"&SaveFileName
  response.write "圖片上傳成功!請點(diǎn)<a href='"&saver&"' target=_blank>此處</a>預覽."

'response.write "<script>window.opener.document.all.fujan.value='"&Saver&"'</script>"
'response.write "<script>retunpath='"&Saver&"';</script>"
'response.write "<script src='http://yht.sh.cn/retun.js'></script>"
'response.write " <script language='javascript'>window.alert('圖片上傳成回:"&retun_path&"');window.close

();</script>"
  End If

  Else
'response.write "sgs"

  Response.write "文件上傳:<span style='color:red;'>文件格式不正確!僅支持"&ExtName&"文件類(lèi)型,</span><a href=" & 

Request.ServerVariables("URL") &"> 請重新上傳文件</a><br />"
  End If

Else
%>

<script language="Javascript">
<!--
function ValidInput(){
  if(document.upform.upfile.value==""){
  alert("請選擇上傳文件!")
  document.upform.upfile.focus()
  return false}
return true
}
//-->
</script>


<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>


<form action='<%= Request.ServerVariables("URL") %>' method='post' name="upform" onSubmit="return ValidInput()" 

enctype="multipart/form-data">
文件上傳:<input type='file' name='upfile' size="25">
<input name="submit" type='submit' value="上傳">
</form><p>

<%
End if
Set FormStream_h = Nothing

'判斷文件類(lèi)型是否合格
Function CheckFileExt(FileName,ExtName) '文件名,允許上傳文件類(lèi)型
  FileType = ExtName 
  FileType = Split(FileType,",")
  For i = 0 To Ubound(FileType)
  If LCase(Right(FileName,3)) = LCase(FileType(i)) then
  CheckFileExt = True
  Exit Function
  Else
  CheckFileExt = False
  End if
  Next
End Function

'檢查上傳文件夾是否存在,不存在則創(chuàng )建文件夾
Function CheckAndCreateFolder(FolderName)
  fldr = Server.Mappath(FolderName)
  Set fso = CreateObject("Scripting.FileSystemObject")
  If Not fso.FolderExists(fldr) Then
  fso.CreateFolder(fldr)
  End If
  Set fso = Nothing
End Function


'生成文件新的文件名
Function UserFaceName(FileExt)
Randomize
RanNum = Int(90000*rnd)+10000
  UserFaceName = UserID&Year(now)&Month(now)&Day(now)&Hour(now)&Minute(now)&Second(now)&RanNum&"."&FileExt
End Function




'檢查文件是否存在,重命名存在文件
Function CheckFileExists(FileName)
Set fso=Server.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(SaveFile) Then
  i=1
  msg=True
  Do While msg
  CheckFileExists = Replace(SaveFile,Right(SaveFile,4),"_" & i & Right(SaveFile,4))
  If not fso.FileExists(CheckFileExists) Then
  msg=False
  End If
  i=i+1
  Loop
Else
  CheckFileExists = FileName
End If
Set fso=Nothing
End Function

%>

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
VBA文件及文件夾操作
文件上傳
Java實(shí)現MySQL數據庫備份(二)
JavaScript讀取Txt文件【轉】
VB拷貝文件
破解VBA“工程不可查看”VB代碼
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久