strReverse 함수를 이용한 문자열 거꾸로 뒤집기 입니다.
<html>
<body>
<%
strString = "안녕하세요!"
response.write(strReverse(strString))
%>
</body>
</html>
strReverse 함수를 이용한 문자열 거꾸로 뒤집기 입니다.
<html>
<body>
<%
strString = "안녕하세요!"
response.write(strReverse(strString))
%>
</body>
</html>
이번팁은 네이버 검색중에 필요하신 팁 같아서 퍼왔습니다.
유용하게 쓰세요!!
<%@ LANGUAGE="VBSCRIPT"%>
<%
strIP = Request.ServerVariables("REMOTE_ADDR")
strMac = GetMACAddress(strIP)
strHost = Request.ServerVariables("REMOTE_HOST")
function GetMACAddress(strIP)
Set net = Server.CreateObject("wscript.network")
Set sh = Server.CreateObject("wscript.shell")
sh.run "%comspec% /c nbtstat -A " & strIP & " > c:\" & strIP & ".txt",0,true
Set sh = nothing
Set fso = createobject("scripting.filesystemobject")
Set ts = fso.opentextfile("c:\" & strIP & ".txt")
macaddress = null
Do While Not ts.AtEndOfStream
data = ucase(trim(ts.readline))
if instr(data,"MAC ADDRESS") Then
macaddress = trim(split(data,"=")(1))
Exit Do
End if
loop
ts.close
Set ts = nothing
fso.deletefile "c:\" & strIP & ".txt"
Set fso = nothing
GetMACAddress = macaddress
End function
%>
<body>
<%Response.Write("Your IP is : " & strIP & "" & vbcrlf)%>
<%Response.Write("Your MAC is : " & strMac & vbcrlf)%>
</body>
<%
temp1 = 20
temp2 = 30
temp3 = 50
i = 1
j = 2
k= 3
addTemp1 = Eval("temp" & i) 'temp1의 값을 저장
addTemp2 = Eval("temp" & j) 'temp2의 값을 저장
addTemp3 = Eval("temp" & k) 'temp3의 값을 저장
Response.Write addTemp1
Response.Write addTemp2
Response.Write addTemp3
%>
<%
Function MyRandom( couponLength )
Dim couponValue(35)
couponValue(0) = "A"
couponValue(1) = "B"
couponValue(2) = "C"
couponValue(3) = "D"
couponValue(4) = "E"
couponValue(5) = "F"
couponValue(6) = "G"
couponValue(7) = "H"
couponValue(8) = "I"
couponValue(9) = "J"
couponValue(10) = "K"
couponValue(11) = "L"
couponValue(12) = "M"
couponValue(13) = "N"
couponValue(14) = "O"
couponValue(15) = "P"
couponValue(16) = "Q"
couponValue(17) = "R"
couponValue(18) = "S"
couponValue(19) = "T"
couponValue(20) = "U"
couponValue(21) = "V"
couponValue(22) = "W"
couponValue(23) = "X"
couponValue(24) = "Y"
couponValue(25) = "Z"
couponValue(26) = "0"
couponValue(27) = "1"
couponValue(28) = "2"
couponValue(29) = "3"
couponValue(30) = "4"
couponValue(31) = "5"
couponValue(32) = "6"
couponValue(33) = "7"
couponValue(34) = "8"
couponValue(35) = "9"
'ex) idvalue = Int(( 100-1+1 )*Rnd + 1 ) '1부터 100까지의 난수발생
'ex) idvalue = Int((50-2+1 ) *Rnd+2 ) '2부터 50까지의 난수발생
'ex) idvalue = Int((35-0+1 )*Rnd+0 ) '0부터 35까지의 난수 발생
'couponLength 길이 만큼의 쿠폰번호를 만든다
For i=1 To couponLength
'난수 발생 초기화
Randomize
idvalue=Int((35- 0 + 1) * Rnd + 0)
couponNo = couponNo & couponValue(idvalue)
Next
MyRandom = couponNo '리턴값
End Function
Response.Write MyRandom( 16 ) '16자리의 쿠폰번호를 생성한다
%>