Parse an ADP file and include in page
ns_adp_include [-sameframe | -newframe] filename ?arg1? ?arg2? ?...?
This functions parses the specified file as an ADP and inserts it into the page as if it were an argument to ns_puts. Note that the ADP streaming cannot be turned on from within an ADP executed with the ns_adp_include command.
If -sameframe is specified, no new call frame is created for the ADP, and all variables in the current scope are visible.
If -newframe is specified, a new call frame is created for the ADP. The only way the ADP can access variables visible at the time of the call is if they were explicitly declared global or ns_share before the call, or if the ADP uses the upvar command.
If neither -sameframe nor -newframe are specified, the default is determined by the GlobalInclude configuration file parameter. GlobalInclude is set to Off by default, meaning that Tcl commands will be evaluated locally.
The filename is the file containing the ADP to be parsed. This function uses the directory where the ADP resides to resolve any relative file names.
You can pass optional arguments (arg1, arg2, etc.) to the ADP. The arguments can be accessed within the ADP using the ns_adp_argc, ns_adp_argv, and ns_adp_bind_args functions.
If this call is a nested ADP evaluation (where one ADP calls another), an error will be returned if the maximum number of nested ADP evaluations, determined by the MaxCallDepth parameter, has been exceeded.