[Classic ASP] 인크루드 파일명에 변수 사용

이렇게 쓰면 에러남

<!--#include virtual="/_<%=p%>/<%=m%>.asp" -->

아래처럼 써야됨

<%
     Dim p : p = "main"
     Dim m : m = "index"

     If Request("p") <> "" Then p = Request("p")
     If Request("m") <> "" Then m = Request("m")	

     include_file = "_" & p & "/" & m & ".asp"
     Server.Execute (include_file)
 %>

https://start0.tistory.com/96

guest
0 Comments
Inline Feedbacks
View all comments