티스토리 뷰

이미지의 실제 경로를 숨기고 싶다거나 할때에

과 같이 주고 소스 내부에서는 f 값을 받아서 DB에서 값을 가져오거나 하면 된다.
아래는 간략한 예제이다.

pic.asp :
<%
Response.ContentType = "image/jpeg"

f = Request.Querystring("f")
FilePath = Server.Mappath(f)

Set objStream = Server.CreateObject("ADODB.Stream")
With objStream
	.Open
	.Type = 1
	.LoadFromFile FilePath
	strFile = .Read
End With
Set objStream = Nothing
Response.BinaryWrite strFile
%>
댓글