最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

随机生成文件名的函数_MySQL

来源:动视网 责编:小采 时间:2020-11-09 17:13:14
文档

随机生成文件名的函数_MySQL

随机生成文件名的函数_MySQL: Place this code into an ASP Page and run it! --> Random FileName Creation Function Generator(Length) dim i, tempS, v dim c(39) tempS = c(1) = a: c(2) = b: c(3) = c: c(4) = d: c(5) = e: c(6) = f: c(7) = g c(8) = h: c(9
推荐度:
导读随机生成文件名的函数_MySQL: Place this code into an ASP Page and run it! --> Random FileName Creation Function Generator(Length) dim i, tempS, v dim c(39) tempS = c(1) = a: c(2) = b: c(3) = c: c(4) = d: c(5) = e: c(6) = f: c(7) = g c(8) = h: c(9


  


Place this code into an ASP Page and run it!
-->

Random FileName Creation


<%
Function Generator(Length)
dim i, tempS, v
dim c(39)
tempS = ""
c(1) = "a": c(2) = "b": c(3) = "c": c(4) = "d": c(5) = "e": c(6) = "f": c(7) = "g"
c(8) = "h": c(9) = "i": c(10) = "j": c(11) = "k": c(12) = "l": c(13) = "m": c(14) = "n"
c(15) = "o": c(16) = "p": c(17) = "q": c(18) = "r": c(19) = "s": c(20) = "t": c(21) = "u"
c(22) = "v": c(23) = "w": c(24) = "x": c(25) = "y": c(26) = "z": c(27) = "1": c(28) = "2"
c(29) = "3": c(30) = "4": c(31) = "5": c(32) = "6": c(33) = "7": c(34) = "8": c(35) = "9"
c(36) = "-": c(37) = "_": c(38) = "@": c(39) = "!"
If isNumeric(Length) = False Then
Response.Write "A numeric datatype was not submitted to this function."
Exit Function
End If
For i = 1 to Length
Randomize
v = Int((39 * Rnd) + 1)
tempS = tempS & c(v)
Next
Generator = tempS
End Function

For i = 1 to 20
Randomize
x = Int((20 * Rnd) + 1) + 10
Response.Write Generator(x) & "
" & vbnewline
Next
%>

(出处:Viphot)

文档

随机生成文件名的函数_MySQL

随机生成文件名的函数_MySQL: Place this code into an ASP Page and run it! --> Random FileName Creation Function Generator(Length) dim i, tempS, v dim c(39) tempS = c(1) = a: c(2) = b: c(3) = c: c(4) = d: c(5) = e: c(6) = f: c(7) = g c(8) = h: c(9
推荐度:
标签: 文件 生成 随机
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top