Continuing with Virtual Directories

Continuing on from my post yesterday regarding virtual directories, another nifty tip is that when including files in ASP, you can use either a file or virtual include. Here are two examples:

<!-- #include file="mydirectory/somefile.asp" -->
<!-- #include virtual="/mydirectory/somefile.asp" -->

The first include would pull the file "somefile.asp" off of the disk in the mydirectory folder. The second include would first look for a virtual directory called mydirectory. If it finds it, it loads somefile.asp from that virtual directory. If it doesn't find it, it would then load somefile.asp from the physical mydirectory on disk, just like the first include.

That's it for virtual directory fun for now :).

Posted by Daniel Short on Feb 13, 2006 at 12:00 AM | Categories: VBScript -

Comments