Path rules
WBSP engine has it's own path rules:
- All relative paths are relative to the location of the current WBSP file.
- Root dir is represented by slash (/) character and it represents document
root (wwwroot) directory of current virtual host, and not root directory of
current disk.
- In order to access files on same disk but located above the document root
directory as well as to access files located on other disks or computers,
developer must use absolute paths.
To enable usage of absolute paths, AbsolutePath variable
must be set to true in server configuration section for current virtual host in
wbsp.ssc file. If this variable is not set to true, an error will be generated
when WBSP receives a reference to an absolute path.
Path rules apply to
all WhizBase variables, sections and functions that use external files. Here are
some examples:
[Include]
/shopping.inc
../dbsettings/admin.inc
[FormFields]
wb_basename=\\DatabaseSrv\user23\access\shopping.mdb
wb_logFile=c:\logs\user23\wbsp.log
<!--BeginTemplate-->
<html><body><p>
$wbinc[/globaltop.htm]
<!--WB_BeginDetail-->
Your
registration code is:<br>
$wbrun[c:\scripts\user23\registration.js
|JavaScript|MkRegCode($wbv{CopyID})]
<!--WB_EndDetail-->
$wbinc[shoppingfooter.htm]
</body></html>
Lines shown in red color contain file names with
absolute path.