ODBiC Discussion Board


RE: The INCLUDE command. Help!, Ivan, 05-05-2005

Is the file location relative to the script's directory?

by Roger Harrisr, May 5, 2005 22:28

In ODBiC 2.2 and ODBscript 3.0, there is a predefined variable named $path_translated_dir$ which is set to be the file system directory path of the current script (or template) file. If the file you want to include is on the same directory as the current script, you could do this:

<% INCLUDE $path_translated_dir$/inventory.odb %>

In ODBscript 3.0, there is also a new function named $pathTranslated( ) which can be used to construct a path that's relative to the current script's directory, using standard conventions for specifying parent and subdirectories. For example, if the file you want to include is on a different subdirectory of the script's parent directory, you can do something like this:

<% INCLUDE $pathTranslated("../subdir/inventory.odb") %>

Please see the Users Guide for more info.


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.