ASP
include file / include virtual 차이점
무늬만
2016. 7. 1. 02:44
include file = 상대경로
만약
http://mhw8904.tistory.com/admin/entry/post 이곳에서
post라는 곳을 include 하고자 할때
<!--include file="../../post" -->
하시면됩니다.
include virtual = 절대경로
이거는 말할것도없이 경로를 다써줘야 합니다.
<!--include virtual="/admin/entry/post"-->
두가지는 모두 include를 하지만
file의 경우 인접한 경로에 유용하게 쓰일수있다. 물론 그전의 파일명을 쓰지않아도 된다는 장점까지 있지만, 조금 멀리 존재하는 파일을 include할때는 virtual을 사용하는것또한 나쁘지 않다고 생각이됩니다.