달력

22025  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

<!-- metadata type="typelib" file="c:\program files\common files\system\ado\msado15.dll"-->

<%

option explicit

dim rs, fso, file_path, objfolder, files, file,chk



set rs = server.createobject("adodb.recordset")


rs.cursorlocation = aduseclient


rs.fields.append "file_name", advarchar, 50


rs.cursortype = adopenstatic

rs.locktype = adlockbatchoptimistic

rs.open


set fso = createobject("scripting.filesystemobject")

file_path = server.mappath(".") & "\call"

set objfolder = fso.getfolder(file_path)

set files = objfolder.files


response.write "현재폴더" & objfolder&"<br>"

for each file in files

rs.addnew

rs("file_name") = file.name

'rs.update

next


rs.sort = "file_name asc"


do while not rs.eof

chk=rs("file_name")

response.write rs("file_name")&"<br>"


rs.movenext

loop


rs.close

set rs = Nothing

response.write chk

%>


'ASP' 카테고리의 다른 글

msxml3.dll 오류 '800c0005'  (0) 2012.07.17
asp xml 파싱  (0) 2012.07.09
asp에서 웹페이지 소스 가져오기, 파싱  (0) 2012.06.29
ASP UTF-8 파일 읽기,쓰기 및 실행 예제  (0) 2012.05.11
ASP 날짜 처리 함수  (0) 2012.05.10
Posted by dewlit
|

asp xml 파싱

ASP 2012. 7. 9. 17:02

<%

url = "http://주소"

Set objXmlHttp  = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")

objXmlHttp.open "POST", url , false


objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

objXmlHttp.send  '요청

strResponseText = objXmlHttp.responseText  '응답 텍스트 저장

Set objXmlHttp  = Nothing

'DOM 파서를 이용해 파싱 

Set objMsXmlDom = Server.CreateObject("microsoft.XMLDOM")

objMsXmlDom.async = false

objMsXmlDom.loadXML( strResponseText ) '스트링으로 로드하기 때문에 loadXML 메서드 사용.

'데이터 추출.

count=objMsXmlDom.getElementsByTagName("yArticleId").length - 1

For i=0 To count


yArticleID   = ""& Trim( objMsXmlDom.getElementsByTagName("yArticleId").Item(i).Text )

acUsersId = ""& Trim( objMsXmlDom.getElementsByTagName("acUsersId").Item(i).Text )

yTitle = ""& Trim( objMsXmlDom.getElementsByTagName("yTitle").Item(i).Text ) ' yTitle = 태그 이름

response.write yArticleID&acUsersId&yTitle

next



Set objMsXmlDom = Nothing

%>

'ASP' 카테고리의 다른 글

msxml3.dll 오류 '800c0005'  (0) 2012.07.17
asp 폴더 내 파일 목록 보기  (0) 2012.07.09
asp에서 웹페이지 소스 가져오기, 파싱  (0) 2012.06.29
ASP UTF-8 파일 읽기,쓰기 및 실행 예제  (0) 2012.05.11
ASP 날짜 처리 함수  (0) 2012.05.10
Posted by dewlit
|

<SCRIPT>

font_cho = Array(
'ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ',
'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ',
'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' );

font_jung = Array(
'ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ',
'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ',
'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ',
'ㅠ', 'ㅡ', 'ㅢ', 'ㅣ' );

font_jong = Array(
'', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ',
'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ',
'ㅂ', 'ㅄ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' );



stringtest = "ㅤㅊㅠㄺ";
CompleteCode = stringtest.charCodeAt(0);
UniValue = CompleteCode - 0xAC00;

Jong = UniValue % 28;
Jung = ( ( UniValue - Jong ) / 28 ) % 21;
Cho = parseInt (( ( UniValue - Jong ) / 28 ) / 21);



alert( font_cho[Cho] );
alert( font_jung[Jung] );
alert( font_jong[Jong] );

</SCRIPT>


출처 : http://flashcafe.org/javascript_study/7251

Posted by dewlit
|