json.asp 

<script language="JScript" runat="server">
    var JSON;
    if (!JSON) {
        JSON = {};
    }
    (function () {
        'use strict';
        function f(n) {
            // Format integers to have at least two digits.
            return n < 10 ? '0' + n : n;
        }
        if (typeof Date.prototype.toJSON !== 'function') {
            Date.prototype.toJSON = function (key) {
                return isFinite(this.valueOf())
                    ? this.getUTCFullYear() + '-' +
                        f(this.getUTCMonth() + 1) + '-' +
                        f(this.getUTCDate()) + 'T' +
                        f(this.getUTCHours()) + ':' +
                        f(this.getUTCMinutes()) + ':' +
                        f(this.getUTCSeconds()) + 'Z'
                    : null;
            };
            String.prototype.toJSON =
                Number.prototype.toJSON =
                Boolean.prototype.toJSON = function (key) {
                    return this.valueOf();
                };
        }
        var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
            escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
            gap,
            indent,
            meta = { // table of character substitutions
                '\b': '\\b',
                '\t': '\\t',
                '\n': '\\n',
                '\f': '\\f',
                '\r': '\\r',
                '"' : '\\"',
                '\\': '\\\\'
            },
            rep;
        function quote(string) {
    // If the string contains no control characters, no quote characters, and no
    // backslash characters, then we can safely slap some quotes around it.
    // Otherwise we must also replace the offending characters with safe escape
    // sequences.
            escapable.lastIndex = 0;
            return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
                var c = meta[a];
                return typeof c === 'string'
                    ? c
                    : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
            }) + '"' : '"' + string + '"';
        }
        function str(key, holder) {
    // Produce a string from holder[key].
            var i, // The loop counter.
                k, // The member key.
                v, // The member value.
                length,
                mind = gap,
                partial,
                value = holder[key];
    // If the value has a toJSON method, call it to obtain a replacement value.
            if (value && typeof value === 'object' &&
                    typeof value.toJSON === 'function') {
                value = value.toJSON(key);
            }
    // If we were called with a replacer function, then call the replacer to
    // obtain a replacement value.
            if (typeof rep === 'function') {
                value = rep.call(holder, key, value);
            }
    // What happens next depends on the value's type.
            switch (typeof value) {
            case 'string':
                return quote(value);
            case 'number':
    // JSON numbers must be finite. Encode non-finite numbers as null.
                return isFinite(value) ? String(value) : 'null';
            case 'boolean':
            case 'null':
    // If the value is a boolean or null, convert it to a string. Note:
    // typeof null does not produce 'null'. The case is included here in
    // the remote chance that this gets fixed someday.
                return String(value);
    // If the type is 'object', we might be dealing with an object or an array or
    // null.
            case 'object':
    // Due to a specification blunder in ECMAScript, typeof null is 'object',
    // so watch out for that case.
                if (!value) {
                    return 'null';
                }
    // Make an array to hold the partial results of stringifying this object value.
                gap += indent;
                partial = [];
    // Is the value an array?
                if (Object.prototype.toString.apply(value) === '[object Array]') {
    // The value is an array. Stringify every element. Use null as a placeholder
    // for non-JSON values.
                    length = value.length;
                    for (i = 0; i < length; i += 1) {
                        partial[i] = str(i, value) || 'null';
                    }
    // Join all of the elements together, separated with commas, and wrap them in
    // brackets.
                    v = partial.length === 0
                        ? '[]'
                        : gap
                        ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
                        : '[' + partial.join(',') + ']';
                    gap = mind;
                    return v;
                }
    // If the replacer is an array, use it to select the members to be stringified.
                if (rep && typeof rep === 'object') {
                    length = rep.length;
                    for (i = 0; i < length; i += 1) {
                        if (typeof rep[i] === 'string') {
                            k = rep[i];
                            v = str(k, value);
                            if (v) {
                                partial.push(quote(k) + (gap ? ': ' : ':') + v);
                            }
                        }
                    }
                } else {
    // Otherwise, iterate through all of the keys in the object.
                    for (k in value) {
                        if (Object.prototype.hasOwnProperty.call(value, k)) {
                            v = str(k, value);
                            if (v) {
                                partial.push(quote(k) + (gap ? ': ' : ':') + v);
                            }
                        }
                    }
                }
    // Join all of the member texts together, separated with commas,
    // and wrap them in braces.
                v = partial.length === 0
                    ? '{}'
                    : gap
                    ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
                    : '{' + partial.join(',') + '}';
                gap = mind;
                return v;
            }
        }
    // If the JSON object does not yet have a stringify method, give it one.
        if (typeof JSON.stringify !== 'function') {
            JSON.stringify = function (value, replacer, space) {
    // The stringify method takes a value and an optional replacer, and an optional
    // space parameter, and returns a JSON text. The replacer can be a function
    // that can replace values, or an array of strings that will select the keys.
    // A default replacer method can be provided. Use of the space parameter can
    // produce text that is more easily readable.
                var i;
                gap = '';
                indent = '';
    // If the space parameter is a number, make an indent string containing that
    // many spaces.
                if (typeof space === 'number') {
                    for (i = 0; i < space; i += 1) {
                        indent += ' ';
                    }
    // If the space parameter is a string, it will be used as the indent string.
                } else if (typeof space === 'string') {
                    indent = space;
                }
    // If there is a replacer, it must be a function or an array.
    // Otherwise, throw an error.
                rep = replacer;
                if (replacer && typeof replacer !== 'function' &&
                        (typeof replacer !== 'object' ||
                        typeof replacer.length !== 'number')) {
                    throw new Error('JSON.stringify');
                }
    // Make a fake root object containing our value under the key of ''.
    // Return the result of stringifying the value.
                return str('', {'': value});
            };
        }
    // If the JSON object does not yet have a parse method, give it one.
        if (typeof JSON.parse !== 'function') {
            JSON.parse = function (text, reviver) {
    // The parse method takes a text and an optional reviver function, and returns
    // a JavaScript value if the text is a valid JSON text.
                var j;
                function walk(holder, key) {
    // The walk method is used to recursively walk the resulting structure so
    // that modifications can be made.
                    var k, v, value = holder[key];
                    if (value && typeof value === 'object') {
                        for (k in value) {
                            if (Object.prototype.hasOwnProperty.call(value, k)) {
                                v = walk(value, k);
                                if (v !== undefined) {
                                    value[k] = v;
                                } else {
                                    delete value[k];
                                }
                            }
                        }
                    }
                    return reviver.call(holder, key, value);
                }
    // Parsing happens in four stages. In the first stage, we replace certain
    // Unicode characters with escape sequences. JavaScript handles many characters
    // incorrectly, either silently deleting them, or treating them as line endings.
                text = String(text);
                cx.lastIndex = 0;
                if (cx.test(text)) {
                    text = text.replace(cx, function (a) {
                        return '\\u' +
                            ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
                    });
                }
    // In the second stage, we run the text against regular expressions that look
    // for non-JSON patterns. We are especially concerned with '()' and 'new'
    // because they can cause invocation, and '=' because it can cause mutation.
    // But just to be safe, we want to reject all unexpected forms.
    // We split the second stage into 4 regexp operations in order to work around
    // crippling inefficiencies in IE's and Safari's regexp engines. First we
    // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
    // replace all simple value tokens with ']' characters. Third, we delete all
    // open brackets that follow a colon or comma or that begin the text. Finally,
    // we look to see that the remaining characters are only whitespace or ']' or
    // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
                if (/^[\],:{}\s]*$/
                        .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
                            .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
                            .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
    // In the third stage we use the eval function to compile the text into a
    // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
    // in JavaScript: it can begin a block or an object literal. We wrap the text
    // in parens to eliminate the ambiguity.
                    j = eval('(' + text + ')');
    // In the optional fourth stage, we recursively walk the new structure, passing
    // each name/value pair to a reviver function for possible transformation.
                    return typeof reviver === 'function'
                        ? walk({'': j}, '')
                        : j;
                }
    // If the text is not JSON parseable, then a SyntaxError is thrown.
                throw new SyntaxError('JSON.parse');
            };
        }
    }());
</script>

출처: 쿠팡 https://developers.coupangcorp.com/hc/en-us/articles/360033396834-Classic-ASP-Example 최하단 제공하는 소스압축 파일내 존재함

 

<!--#include file="json.asp"-->
<%
	Call Response.AddHeader("Access-Control-Allow-Origin", "*") ' cors
	Response.ContentType = "application/json"

	dim bytes,binary,reqbody
	bytes=Request.TotalBytes
	binary=Request.BinaryRead(bytes)

	set stream = Server.CreateObject("Adodb.Stream")
	stream.type = 1
	stream.open
	stream.write(binary)
	stream.position = 0
	stream.type = 2
	stream.charset = "utf-8"
	reqbody=stream.readtext()
	stream.close
	set stream = nothing

	dim params
	set params = JSON.parse(reqbody)
%>
	json이 { "id": "test", "age": 100, "group": { "group_name": "dev" } }라고 치면
    params.id
    params.age
    params.group.group_name
    으로 접근가능함
<%   
	set params = nothing	
%>

'Classic ASP' 카테고리의 다른 글

Baisc Auth  (0) 2023.11.01
엑셀 xlsx 읽어들여 DB에 저장하기  (0) 2016.12.05
파일 복사  (0) 2016.11.08
스케쥴러  (0) 2016.09.23
숫자 관련 추가 함수  (0) 2016.06.27
<%
' Decodes a base-64 encoded string (BSTR type).
' 1999 - 2004 Antonin Foller, http://www.motobit.com
' 1.01 - solves problem with Access And 'Compare Database' (InStr)
Function Base64Decode(ByVal base64String)
  'rfc1521
  '1999 Antonin Foller, Motobit Software, http://Motobit.cz
  Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
  Dim dataLength, sOut, groupBegin
  
  'remove white spaces, If any
  base64String = Replace(base64String, vbCrLf, "")
  base64String = Replace(base64String, vbTab, "")
  base64String = Replace(base64String, " ", "")
  
  'The source must consists from groups with Len of 4 chars
  dataLength = Len(base64String)
  If dataLength Mod 4 <> 0 Then
    Err.Raise 1, "Base64Decode", "Bad Base64 string."
    Exit Function
  End If

  
  ' Now decode each group:
  For groupBegin = 1 To dataLength Step 4
    Dim numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut
    ' Each data group encodes up To 3 actual bytes.
    numDataBytes = 3
    nGroup = 0

    For CharCounter = 0 To 3
      ' Convert each character into 6 bits of data, And add it To
      ' an integer For temporary storage.  If a character is a '=', there
      ' is one fewer data byte.  (There can only be a maximum of 2 '=' In
      ' the whole string.)

      thisChar = Mid(base64String, groupBegin + CharCounter, 1)

      If thisChar = "=" Then
        numDataBytes = numDataBytes - 1
        thisData = 0
      Else
        thisData = InStr(1, Base64, thisChar, vbBinaryCompare) - 1
      End If
      If thisData = -1 Then
        Err.Raise 2, "Base64Decode", "Bad character In Base64 string."
        Exit Function
      End If

      nGroup = 64 * nGroup + thisData
    Next
    
    'Hex splits the long To 6 groups with 4 bits
    nGroup = Hex(nGroup)
    
    'Add leading zeros
    nGroup = String(6 - Len(nGroup), "0") & nGroup
    
    'Convert the 3 byte hex integer (6 chars) To 3 characters
    pOut = Chr(CByte("&H" & Mid(nGroup, 1, 2))) + _
      Chr(CByte("&H" & Mid(nGroup, 3, 2))) + _
      Chr(CByte("&H" & Mid(nGroup, 5, 2)))
    
    'add numDataBytes characters To out string
    sOut = sOut & Left(pOut, numDataBytes)
  Next

  Base64Decode = sOut
End Function
%>

<%
Dim UID, PWD
GetUser UID, PWD
If UID <> "아이디" or PWD <> "비밀번호" Then
  Response.Status = "401 Access Denied"
End If

Sub GetUser(LOGON_USER, LOGON_PASSWORD)
  Dim UP, Pos, Auth
  Auth = Request.ServerVariables("HTTP_AUTHORIZATION")
  LOGON_USER = ""
  LOGON_PASSWORD = ""
  If LCase(Left(Auth, 5)) = "basic" Then
    UP = Base64Decode(Mid(Auth, 7))
    Pos = InStr(UP, ":")
    If Pos > 1 Then
      LOGON_USER = Left(UP, Pos - 1)
      LOGON_PASSWORD = Mid(UP, Pos + 1)
    End If
  End If
End Sub
%>

 

 

출처: https://www.motobit.com/tips/detpg_base64/

'Classic ASP' 카테고리의 다른 글

request body json data parsing  (1) 2023.11.01
엑셀 xlsx 읽어들여 DB에 저장하기  (0) 2016.12.05
파일 복사  (0) 2016.11.08
스케쥴러  (0) 2016.09.23
숫자 관련 추가 함수  (0) 2016.06.27

<!--METADATA TYPE= "typelib"  NAME= "ADODB Type Library" 

      FILE="C:\Program Files\Common Files\SYSTEM\ADO\msado15.dll"  -->

<% 

dim sConn

Set sConn = Nothing

set sConn = Server.CreateObject("ADODB.Connection")

sConn.open "Provider=SQLOLEDB; Data Source=DB주소; Initial Catalog=DBa명; User Id=아이디; Password=비번"

Dim xlsxFile

Dim SheetNamez

Dim xlsxConn

Dim strSQL

xlsxFile = "파일경로"


Set xlsxConn = Server.CreateObject("ADODB.Connection")

xlsxConn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & xlsxFile & "; Extended Properties=Excel 12.0;"

Set Rs = Server.CreateObject("ADODB.Recordset")

Set rsData = Server.CreateObject("ADODB.Recordset")


SheetName = "시트명"

strSQL = "SELECT * FROM [" & SheetName & "$]"


i = 1

Rs.Open strSQL, xlsxConn, 1, , 1

Do Until Rs.EOF

if i > 3 then ' 행은 1부터 시작

rsData.open "테이블명", sConn, 1, 2, adCmdTable

rsData.addnew

rsData("컬럼1") = trim(Rs(0)) ' 열은 0부터 시작

rsData("컬럼2") = trim(Rs(1))

rsData("컬럼3") = now()


rsData.update

rsData.close


end if


i = i + 1

Rs.MoveNext

Loop


Rs.Close

Set rsData = Nothing

Set Rs = Nothing

Set xlsxConn = Nothing

sConn.Close

set sConn = Nothing

%>


'Classic ASP' 카테고리의 다른 글

request body json data parsing  (1) 2023.11.01
Baisc Auth  (0) 2023.11.01
파일 복사  (0) 2016.11.08
스케쥴러  (0) 2016.09.23
숫자 관련 추가 함수  (0) 2016.06.27

old_path = "c:\test\test.asp"

new_path = "c:\new_test\"    ' 끝에 \까지 넣어주면 권한 문제 발생소지가 줄어든다.


Set fso = CreateObject("Scripting.FileSystemObject")

fso.copyfile  old_path, new_path, true        ' true는 오버라이트, false는 대상폴더에 겹치는 파일이 있으면 중단됨

Set fso = nothing


'Classic ASP' 카테고리의 다른 글

Baisc Auth  (0) 2023.11.01
엑셀 xlsx 읽어들여 DB에 저장하기  (0) 2016.12.05
스케쥴러  (0) 2016.09.23
숫자 관련 추가 함수  (0) 2016.06.27
엑셀파일로 다운로드 받기  (2) 2016.06.22
윈도우 스케쥴러를 사용한다.

트리거 - 얼마 단위로 돌릴지 선택
동작 - 프로그램 시작 

프로그램/스크립트
"C:\Program Files (x86)\Internet Explorer\iexplore.exe"

인수추가(옵션) asp 파일 경로
시작위치(옵션) C:\Program Files


설정 - 새인스턴스 실행 안함




'Classic ASP' 카테고리의 다른 글

엑셀 xlsx 읽어들여 DB에 저장하기  (0) 2016.12.05
파일 복사  (0) 2016.11.08
숫자 관련 추가 함수  (0) 2016.06.27
엑셀파일로 다운로드 받기  (2) 2016.06.22
사이트 긁어오기  (0) 2015.08.20

항상올림

Function roundUp(x) If x > Int(x) then roundup = Int(x) + 1 Else roundup = x End If 

End Function


숫자 앞에 0으로 채우기

Function PadDigits(n, length)
   PadDigits = Right(String(length,"0") & n, length)
End Function


출처: http://www.albofish.co.uk/2011/03/asp-functions-round-up-leading-zeros/



숫자를 한글로

Function chang_money(money)

        dim num1 ' 한글 숫자 배열

        dim num2 ' 한글 숫자 단위 배열

        dim posNoLevel ' 한글 숫자 단위 출력 위치

        dim tempNo ' 한글 숫자 현재 단위 조립용

        dim strNo ' 한글 숫자 전체 조립용

        dim cntNo ' 변환할 숫자의 길이

        dim posNo ' 변환할 숫자의 현재 변환 위치

        

        num1 = Array("", "일", "이", "삼", "사", "오", "육", "칠", "팔", "구")

        num2 = Array("", "십", "백", "천", "만", "십", "백", "천", "억", "십", "백", "천", "조", "십", "백", "천", "경")

        

        cntNo = Len(money)

        

        ' 숫자가 0 일 경우

        if money = 0 then 

                strNo = "영"

        else

                strNo = ""

                posNoLevel = 0

                posNo = cntNo

                do

                        mo = Cint( Mid(money, posNo, 1) )


                        ' 나머지 값이 0 이 아닐 경우

                        if 0 < mo then

                                tempNo = num1(mo)

                                tempNo = tempNo & num2(posNoLevel)

                                strNo = tempNo & strNo

                        else

                                ' 나머지 값이 0 이면서 10000 단위일때(만, 억, ..)

                                if (posNoLevel Mod 4) = 0 then

                                        strNo = num2(posNoLevel) & strNo

                                end if

                        end if

                        

                        posNoLevel = posNoLevel + 1

                        posNo = posNo - 1

                loop while 0 < posNo

        end if

        

        chang_money = strNo

End Function


출처: http://dumbung.com/main/bbs/board.php?bo_table=ASP_TIP&wr_id=9





'Classic ASP' 카테고리의 다른 글

파일 복사  (0) 2016.11.08
스케쥴러  (0) 2016.09.23
엑셀파일로 다운로드 받기  (2) 2016.06.22
사이트 긁어오기  (0) 2015.08.20
ASP에서 JSON을 쓰려면  (0) 2015.03.06

HTML Table 태그에 내용 넣고 헤더를 고쳐서 엑셀파일인 척해서 다운로드 받기

최상단에 아래 

<%

Response.AddHeader "Content-Disposition","attachment;filename=다운로드 받을 디폴트 파일명.xls"

Response.ContentType = "application/octet-stream"

%>

<table>

<tr>

     <th>컬럼타이틀</th>

</tr>

<tr>

<td>내용</td>

</tr>

</table>



진짜 엑셀파일에 값만 채워넣고 다운로드 받기 - VBScript를 이용해야 한다.

출처: http://stackoverflow.com/questions/24517978/asp-classsic-insert-into-excel-xls-columns-or-create-a-real-excel-format-file

<%@Language=VBScript CodePage=65001%>

<%

    Dim Fso

    Set Fso = Server.CreateObject("Scripting.FileSystemObject")


    Dim emptyXlsFileName

        emptyXlsFileName = Server.Mappath("원본엑셀파일.xlsx") 'empty original file path


    Dim filledXlsFileName

        filledXlsFileName = Replace(Fso.GetTempName, ".tmp", ".xlsx") 'temp file will be created and filled


    Fso.CopyFile emptyXlsFileName, Server.Mappath(filledXlsFileName)

    Dim Connection

    Set Connection = Server.CreateObject("Adodb.Connection") ' 이걸로 해야 오피스가 깔리지 않은 서버에서도 사용 가능하다.

        Connection.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.Mappath(filledXlsFileName) & ";Extended Properties=""Excel 12.0;HDR=YES;IMEX=0"";" ' xlsx라 12.0이고 xls면 8.0, 첫열을 타이틀로 할거면 HDR=YES, 아니면 HDR=NO



sql = "select * from [Sheet1$]" ' sheet1 다 불러오기

set objRs = Server.CreateObject("ADODB.Recordset")

objRs.open sql, Connection, 1, 3


rows = 0

do while Not objRs.EOF

if rows = 0 then

objRs.Fields(0).Value = "제목을 제외한 첫번째 줄, 첫번째 컬럼 그러니까 A2"

elseif rows = 1 then 

objRs.Fields(1).Value = "B3"

   objRs.Fields("첫열이 타이틀이었다면 그 컬럼명").Value = "넣을 값"

end if

rows = rows + 1

objRs.MoveNext

loop


objRs.Close

set objRs = Nothing


        Connection.Close

    Set Connection = Nothing


    Const BufferSize = 8192


    Response.ContentType = "application/vnd.ms-excel"

    Response.AddHeader "Content-Disposition", "attachment;filename=다운로드할 디폴트 파일명.xlsx"

    Dim Stm

    Set Stm = Server.CreateObject("Adodb.Stream")

        Stm.Type = 1 'adTypeBinary

        Stm.Open

        Stm.LoadFromFile Server.Mappath(filledXlsFileName)

        Do While Not Stm.EOS

            Response.BinaryWrite Stm.Read(BufferSize)

            Response.Flush

            If Not Response.IsClientConnected Then Exit Do

        Loop

        Stm.Close

    Set Stm = Nothing

    Fso.DeleteFile Server.Mappath(filledXlsFileName)

    Response.End


    Set Fso = Nothing

%>


'Classic ASP' 카테고리의 다른 글

스케쥴러  (0) 2016.09.23
숫자 관련 추가 함수  (0) 2016.06.27
사이트 긁어오기  (0) 2015.08.20
ASP에서 JSON을 쓰려면  (0) 2015.03.06
sleep / delay  (0) 2014.09.12

<%

'페이지로드Post방식

Function getSiteSourcePost( siteURL, params )

 Set httpObj = Server.CreateObject("WinHttp.WinHttpRequest.5.1")

 httpObj.open "POST" , siteURL, False

 httpObj.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"

 '포스트 방식시 위의 라인을 추가해 주어야 한다.

  

 httpObj.Send params

 '포스트의 파라미터는 Send 호출시 같이 값을 넘겨 주어야 한다.

 httpObj.WaitForResponse

 If httpObj.Status = "200" Then

  getSiteSourcePost = httpObj.ResponseText

 Else

  getSiteSourcePost = null

 End If

End Function

 

'페이지로드 get방식

Function getSiteSourceGet( siteURL, params )

 Set httpObj = Server.CreateObject("WinHttp.WinHttpRequest.5.1")

 httpObj.open "GET", siteURL & "?" & params, False

  

 httpObj.Send()

 httpObj.WaitForResponse

 If httpObj.Status = "200" Then

  getSiteSourceGet = httpObj.ResponseText

 Else

  getSiteSourceGet = null

 End If

End Function

 

contents = getSiteSourcePost("사이트주소","")

response.write(contents)

%>


출처: http://2nusa.blogspot.kr/2013/05/class-asp.html

'Classic ASP' 카테고리의 다른 글

숫자 관련 추가 함수  (0) 2016.06.27
엑셀파일로 다운로드 받기  (2) 2016.06.22
ASP에서 JSON을 쓰려면  (0) 2015.03.06
sleep / delay  (0) 2014.09.12
ASP의 컬렉션(Dictionary, Map, 연관배열)  (0) 2014.03.12

1. https://code.google.com/p/aspjson/

2. http://www.aspjson.com/

3. https://github.com/nagaozen/asp-xtreme-evolution/blob/master/lib/axe/classes/Parsers/json2.asp


1의 장점은 사용이 매우 편리하고 직관적임. 다만 output만 지원함.

2의 장점은 json output, input을 둘 다 지원함. 다만 사용법이 번잡스럽고 직관적이지 못함. 비추

3은 json parser. 직관적으로 사용가능하다.


그러므로 1,3을 조합해서 쓰는게 제일 낫다.


'Classic ASP' 카테고리의 다른 글

엑셀파일로 다운로드 받기  (2) 2016.06.22
사이트 긁어오기  (0) 2015.08.20
sleep / delay  (0) 2014.09.12
ASP의 컬렉션(Dictionary, Map, 연관배열)  (0) 2014.03.12
ASP의 배열(Array)  (0) 2014.03.12

        ' sleep 함수

Function Sleep(seconds)

set oShell = CreateObject("Wscript.Shell")

cmd = "%COMSPEC% /c timeout " & seconds & " /nobreak"

oShell.Run cmd,0,1

End Function


        ' 사용예

For i = 1 to 10

response.write("End "&i&"<br>")

Sleep(5)

Next


출처: http://stackoverflow.com/questions/2237393/how-to-delay-a-response-in-classic-asp

'Classic ASP' 카테고리의 다른 글

사이트 긁어오기  (0) 2015.08.20
ASP에서 JSON을 쓰려면  (0) 2015.03.06
ASP의 컬렉션(Dictionary, Map, 연관배열)  (0) 2014.03.12
ASP의 배열(Array)  (0) 2014.03.12
윈도우7에서 ASP(.net 말고) 설치  (0) 2013.03.11

+ Recent posts