일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- join
- array
- ERD
- VARIABLE
- sql랭킹
- FileSystemObject
- SPLIT
- jdbc driver
- VarType
- 이미지세로길이
- MSSQL보안
- tempDB
- injection
- 인젝션
- inner join
- 자바기초
- update
- xmldom
- asp함수
- instr
- wap
- 정규식
- 이미지가로길이
- sql순위
- javascript 한글입력체크
- 한글입력체크
- sql업데이트
- XML
- WML
- JavaScript
- Today
- Total
목록플밍_ASP (74)
3초기억력
제목 : ASP - 이미지 URL경로의 BinaryWrite 하기 내용 : 확장자를 추출하는 function 이용해서 contenttype 찾고, 처리하면 될듯 Get 방식은 주석부분에서 하나 선택 테스트해본 결과 제대로 Binary로 write 됨. 오라클 DB 에 BLOB 타입으로 넣으면 되려나... 출처 :
아래의 function 은 받은 변수에 시작문자, 끝 문자 사이의 문자열을 추출하는 겁니당 예를 들면 를 str 로 받아서 id=" 부터 " 까지의 사이값을 가져오고 싶을때... getStringBetween(str, "id="", "" alt=") 하면 10000222003030 이 떨어짐. '// html 태그중 시작태그점 끝태그점 사이의 값을 추출(S) Function getStringBetween(str, sstart, send) Dim PosStart, str_temp, PosEnd If Len(str) > 0 then PosStart = InStr(str, sstart) str_temp = Mid(str, PosStart, Len(str)) PosEnd = InStr(str_temp, send..
Function GetUniqueName(byRef strFileName, DirectoryPath) Dim strName, strExt strName = Mid(strFileName, 1, InstrRev(strFileName, ".") - 1) strExt = Mid(strFileName, InstrRev(strFileName, ".") + 1) Dim fso Set fso = Server.CreateObject("Scripting.FileSystemObject") Dim bExist : bExist = True '우선 같은이름의 파일이 존재한다고 가정 Dim strFileWholePath : strFileWholePath = DirectoryPath & "\" & strName & "." & str..
on Error Resume Next asp 코딩 어쩌구 저쩌구~~~ asp 코딩 어쩌구 저쩌구~~~ asp 코딩 어쩌구 저쩌구~~~ asp 코딩 어쩌구 저쩌구~~~ If Err.Number 0 then Response.Write Err.Number & " - 에러 번호 " Response.Write Err.Description & " - 에러 메시지 " Response.Write Err.Source & " - 에러 출처 " Response.Write Err.NativeError & " - DB 에러번호 " Response.Write Err.HelpFile & " - 에러 파일 " Response.Write Err.HelpContext & " - 에러 Context " End If Note that th..
출처: http://snippets.dzone.com Function stripTags(HTMLstring) Set RegularExpressionObject = New RegExp With RegularExpressionObject .Pattern = "]+>" .IgnoreCase = True .Global = True End With stripTags = RegularExpressionObject.Replace(HTMLstring, "") Set RegularExpressionObject = nothing End Function ----------------------------------------------------- 출처 : http://dualist.tistory.com/115 01.
filePath = "/datguri.net/aspExt.asp" fileExt = Mid(filePath, InStrRev(filePath, ".") + 1) response.Write "파일 확장자는 " & fileExt%>
img_url = "http://~~~경로" Set xh = CreateObject("MSXML2.ServerXMLHTTP") xh.Open "GET", img_url, false xh.Send() imgData = xh.ResponseBody Set xh = Nothing Set stm =CreateObject("ADODB.Stream") stm.open() stm.type=1 stm.write imgData stm.SaveToFile 저장경로&저장할이름, 2 stm.close() Set stm = Nothing%>
Function SaveBinaryData(FileName, ByteArray) Const adTypeBinary = 1 Const adSaveCreateOverWrite = 2 'Create Stream object Dim BinaryStream Set BinaryStream = CreateObject("ADODB.Stream") 'Specify stream type - we want To save binary data. BinaryStream.Type = adTypeBinary 'Open the stream And write binary data To the object BinaryStream.Open BinaryStream.Write ByteArray 'Save binary data To disk ..
대부분의 ASP 개발자들은 FSO(File System Object)를 이용하여 파일 시스템 핸들링 하는 방법에 대해 어느 정도 알고 있다. 하지만 FSO를 이용하여서는 바이너리 데이터가 들어 있는 파일을 읽고 표시하기는 어렵다. ASP는 매크로가 들어 있는 엑셀 파일이나, PDF 파일, 이미지 파일 등 바이너리 데이터가 들어 있는 파일을 다루기 위한 방법을 지원하지 않고 있다. 하지만 비주얼 베이직을 이용하여 이 부분을 보완할 만한 컴포넌트를 직접 작성할 수 가 있다. 여기서 다룰 내용을 직접 해보고자 한다면 비주얼 베이직 5.0 이상이 필요하다. 이제부터 바이너리 데이터가 들어 있는 파일을 읽어들이는 MyObject라는 ActiveX DLL을 비주얼 베이직을 통해 직접 만들어 보도록 하자. 우선 비주..
Set BinaryStream = CreateObject("ADODB.Stream")set fs = Server.CreateObject("Scripting.FileSystemObject")Set Fil = fs.GetFile("E:\file_upload\1.jpg") '절대경로BinaryStream.Type = 1BinaryStream.OpenBinaryStream.LoadFromFile Fil.pathDim iConst BlockSize = 1000For i = 1 To BinaryStream.Size Step BlockSize Response.BinaryWrite BinaryStream.Read(BlockSize)Next'if Not BinaryStream.EOS Then Response.Binar..