Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- lsusb
- RTL88x2BU
- PHP GCM
- jQuery
- ASP
- 크로스 컴파일
- form
- replace
- FileSystemObject
- readonly
- AC1300
- XMLHTTP
- jquery 레이어
- 시놀로지
- Injection
- euc-kr
- include
- javascript
- println
- disabled
- utf-8
- ajax
- Getrows
- submit
- 따라다니는 배너
- DS718+
- 무선랜카드
- SQL Injection
- synology
- 커널
Archives
- Today
- Total
아는 것이 좋은 것이다.
[ASP] 다운로드 페이지 프로그램 본문
<%
Dim File_Name, file_path, strUA
Dim intVersion, up_path
Dim objStream
Dim strFile
File_Name = Trim(Request.QueryString("filename"))
file_path = Server.MapPath("/m/weekly_report/") & "\" & File_Name
'Response.write "file_path=" & file_path & "<BR>"
'Response.end
strUA = Request.ServerVariables("HTTP_USER_AGENT")
Response.ContentType = "application/unknown"
'If InStr(Request.ServerVariables("HTTP_USER_AGENT"), "Chrome") > 0 Then
Response.AddHeader "Content-Disposition","attachment; filename="&Server.URLPathEncode(File_Name) ' ie,크롬 다운로드 잘됨
'Else
'Response.AddHeader "Content-Disposition","attachment; filename="&Server.URLPathEncode(File_Name)
'End If
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile(file_path)
strFile = objStream.Read
Response.BinaryWrite strFile
Set objStream = Nothing
%>
'ASP' 카테고리의 다른 글
[ASP] Getrows 페이지 이동, 페이징(2차원 배열) (0) | 2014.05.07 |
---|---|
[ASP] 한글 깨짐 변환 (1) | 2014.04.30 |
[ASP] 달력 생성 소스 (공휴일 추가가능) (0) | 2014.04.27 |
[ASP] 파일이동, 폴더이동, 파일삭제 (0) | 2014.04.27 |
[ASP] 클래스로 xml 생성 (0) | 2014.04.24 |
Comments