|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi,
I'm trying to have 1 folder for include files that can be called from other files on root, in subfolders below root, and in subfolders under other sub-level folders. What approach should I take? Here's what I've tried: First, Tried regular #include file=inc/filename, and that works, but then I need to make different versions of the same code for each folder level that will call the include files. (ie, 1 level below root gets "#include file=../inc/filename for the include and links & images have "../" before their path, too. It works but the multiple copies of the code is an issue for updating. Second, tried virtual #include virtual=include/filename, and that works, created the virtual folder include to point to the actual inc folder, it gets the file ok, it displays it ok, but then the links & images are still relative to the the file that called them (some sub folder), not where the include file is at (inc in root). What else can I try? It is possible, right? Can't really use full path (URL.....) for include, links & images as this needs to move from test server to prod, etc, w/o changing contents of files. I thought about base href, but a) that's in head tags only, and b) that'd set the whole page .... |
|
#2
|
|||
|
|||
|
Try using include virtual from the top of your website
#include virtual="/images/somefile.asp"
__________________
====== Doug G ====== "Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton |
|
#3
|
|||
|
|||
|
Ok, got it!
Though our virual was on the root, and we did use /, it also needed a change in IIS, site properties, local path. Otherwise we were so close, yet still not getting it. Now, all three pieces work together as they should. Whew. |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Virtual Directories, includes, & getting correct paths??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|