[All]
How does require_once and use_unit work?
摘要: How does require_once and use_unit work?
Q:How does require_once and use_unit work?
A:The first require_once on forms includes the vcl/vcl.inc.php script, which is the starter for the VCL. That script provides the function use_unit, which is not part of PHP language but is a VCL function. Note that paths are *relative to the vcl folder*, for example:
//vcl.inc.php must be in a subfolder of your app require_once("vcl/vcl.inc.php");
//forms.inc.php must be in the vcl folder use_unit("forms.inc.php");
//yourscript.inc.php must be in a subfolder inside vcl folder use_unit("subfolder/yourscript.inc.php");