본문 바로가기
Programming/Classic ASP, ASP.NET

[ASP] image 직접 삽입하지 않고 image 출력하기

by Berasix 2022. 10. 7.
반응형
<%
    Dim imageBaseUrl : imageBaseUrl = "https://" & request.servervariables("HTTP_HOST") & "/디렉토리/"
    Dim imageFile : imageFile = Request.QueryString("imageFile")
    Dim imageUrl : imageUrl = ""

    imageUrl = imageBaseUrl & imageFile
    
    Response.ContentType = "image/png"
    Set xh = CreateObject("MSXML2.ServerXMLHTTP")
    xh.Open "GET" , imageUrl , false
    xh.Send
    binBody = xh.responseBody
    Set xh = nothing

    Response.BinaryWrite binBody
%>

 

728x90

댓글