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 | 31 |
Tags
- XMLHTTP
- synology
- euc-kr
- lsusb
- println
- utf-8
- jquery 레이어
- replace
- Getrows
- 크로스 컴파일
- 커널
- ajax
- FileSystemObject
- disabled
- submit
- AC1300
- javascript
- jQuery
- SQL Injection
- 시놀로지
- 무선랜카드
- include
- 따라다니는 배너
- DS718+
- readonly
- ASP
- Injection
- RTL88x2BU
- form
- PHP GCM
Archives
- Today
- Total
아는 것이 좋은 것이다.
[ASP] 변수로 인클루드(include) 하기 본문
<!--#include virtual="<%=str_type%>"-->
위와 같은 방식으로 인클루드를 할경우 오류가 난다.
<% str_type = request("type") If str_type = "test" then %> <!--#include virtual="test.asp"--> <% ElseIf str_type = "test2" Then %> <!--#include virtual="test2.asp"--> <% End if %>
위와 같은 방식으로 사용은 가능하나 변수가 많아지면 비효율적이다.
<% dirFile = request("type") & ".asp" Server.Execute (dirFile) %>
위와 같은 방식으로 간단하게 인클루드가 가능해진다.
'ASP' 카테고리의 다른 글
[ASP] 숫자 앞에 원하는 개수만큼 0 붙이기 (1) | 2014.07.06 |
---|---|
[ASP] XML 읽어서 출력 (0) | 2014.06.28 |
[ASP] XMLHTTP GET으로 파일 읽어오기 (0) | 2014.06.11 |
[ASP] ASP 쌍따옴표 replace (0) | 2014.06.05 |
[ASP] 랜덤함수 (0) | 2014.05.23 |
Comments