六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺(tái)!

ASP中常用的文件處理函數(shù)

[摘要]asp 中處理文件上傳以及刪除時(shí)常用的自定義函數(shù): <% '''''''''''''&#...

asp 中處理文件上傳以及刪除時(shí)常用的自定義函數(shù):

<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'所有自定義的VBS函數(shù)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function DeleteFile(Filename) '刪除文件
if Filename<>"" then
Set fso = server.CreateObject("Scripting.FileSystemObject")
if fso.FileExists(Filename) then
fso.DeleteFile Filename
end if
set fso = nothing
end if
end function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function CreateDIR(byval LocalPath) '建立目錄的程序,如果有多級(jí)目錄,則一級(jí)一級(jí)的創(chuàng)建
on error resume next
LocalPath = replace(LocalPath,"\","/")
set FileObject = server.createobject("Scripting.FileSystemObject")
patharr = split(LocalPath,"/")
path_level = ubound(patharr)
for i = 0 to path_level
if i=0 then pathtmp=patharr(0) & "/" else pathtmp = pathtmp & patharr(i) & "/"
cpath = left(pathtmp,len(pathtmp)-1)
if not FileObject.FolderExists(cpath) then FileObject.CreateFolder cpath
next
set FileObject = nothing
if err.number<>0 then
CreateDIR = false
err.Clear
else
CreateDIR = true
end if
end function

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function SaveRandFileName(byval szFilename) '根據(jù)原文件名生成新的隨機(jī)文件名
randomize
'ranNum=int(90000*rnd)+10000
'if month(now)<10 then c_month="0" & month(now) else c_month=month(now)
'if day(now)<10 then c_day="0" & day(now) else c_day=day(now)
'if hour(now)<10 then c_hour="0" & hour(now) else c_hour=hour(now)
'if minute(now)<10 then c_minute="0" & minute(now) else c_minute=minute(now)
'if second(now)<10 then c_second="0" & second(now) else c_second=minute(now)
fileExt_a=split(szFilename,".")
fileExt=lcase(fileExt_a(ubound(fileExt_a)))

SaveRandFileName=replace(replace(replace(now,":",""),"-","")," ","")&int(10*rnd)&"."&fileExt
'GenerateRandomFileName = year(now)&c_month&c_day&c_hour&c_minute&c_second&"_"&ranNum&"."&fileExt
end function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

function jaron_replacer(strContent,start_string,end_string,replace_string)
'CMS替換函數(shù):源字符串,前部分,后部分,替換成的字符
'返回被替換后的字符串
jaron_replacer = replace(strContent,mid(strContent,instr(strContent,start_string),instr(strContent,end_string)+len(end_string)-1),replace_string)
end function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function replaceplus(strContent,start_string,end_string,replace_string)
'文檔中,將所有開始,結(jié)束之間的所有字符刪除
on error resume next
MARKCOUNTS = ubound(split(strContent,start_string))
PRESTRING = strContent
for i=0 to MARKCOUNTS
STARTMARK=instr(1,PRESTRING,start_string,1)
if STARTMARK=0 then exit for
COMPMARK=instr(1,PRESTRING,end_string,1) + len(end_string)
VerString=mid(PRESTRING,STARTMARK,COMPMARK - STARTMARK)
PRESTRING = replace(PRESTRING,VerString,replace_string)
next
replaceplus = PRESTRING
if err.number<>0 then err.Clear
end function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
(出處:PConlin)


主站蜘蛛池模板: 日本精品在线播放 | 亚欧精品一区二区三区四区 | 青青草久久 | 亚洲六月丁香六月婷婷花 | 欧美视频黄色 | 青青色在线观看 | 色视频在线观看网站 | 性激烈欧美三级在线播放 | 日韩在线不卡 | 速度与激情9全集免费观看 速度与激情9免费完整版高清 | 视频二区 素人 欧美 日韩 | 青春草久久 | 天天弄天天模 | 视频一区中文字幕 | 欧美中日韩在线 | 亚洲福利秒拍一区二区 | 色吊丝最新永久免费观看网站 | 特a级片| 色婷婷中文字幕在线一区天堂 | 亚洲天堂在线视频观看 | 天天干天天草天天 | 四虎影视成人永久在线播放 | 欧美一a一片一级一片 | 欧美做a一级视频免费观看 欧美坐爱视频 | 色花堂国产精品首页第一页 | 奇米婷婷 | 午夜性爽视频男人的天堂在线 | 日韩亚洲欧美一区二区三区 | 天天欲色 | 色偷偷尼玛图亚洲综合 | 日韩欧美国产中文字幕 | 三级aa| 日韩中文字幕在线观看视频 | 日日夜夜操天天干 | 伊人婷婷在线 | 天堂tv | 三级国产日产 | 中国xxxx色视频在线观看 | 一本伊人| 亚洲一区二区三区影院 | 色妞精品一区二区 |