vbscript - How to verify that all required included files exist on startup -
does still work classic asp vbscript , know if possible verify on startup included files exist? large project , requires refactoring before moving files subfolders i'd have test in place ensures includes still pointing correct files.
not i've ever tried , here's why
in classic asp can have 2 types of #include
ssi directives;
relative path includes, path current directory.
<!-- #include file = "subfolder/file.asp" -->
virtual path includes, take path root of containing web application.
<!-- #include virtual = "/toplevelfolder/subfolder/file.asp" -->
if have enable parent paths
set in web application can use ../
traverse parent folders when using #include file
.
with in mind, think have minute.
first need identify #include
directives using loop iterate through web application , find .asp
files example , use regular expression pull out path. there complications.
- you have distinguish both
file
,virtual
types of#include
- workout way translate both types of path, possibly using
getabsolutepathname()
, verify files existence. virtual
includes can point virtual directories exist in iis , point physical location (doesn't have inside folder structures of web application). biggest complication in honesty.
Comments
Post a Comment