再问下,我见过有的程序中会有这样的句子
DEFINE ('XX','D:/XXXXX/');既然用ini_set已经把include的绝对路径确定下来了,这个DEFINE就没有必要用了吧?你用过DEFINE吗?如果用过,又通常在什么地方呢?
DEFINE ('XX','D:/XXXXX/');既然用ini_set已经把include的绝对路径确定下来了,这个DEFINE就没有必要用了吧?你用过DEFINE吗?如果用过,又通常在什么地方呢?
但是我不喜欢,我用全局变量。这样引用时书写方便点。
个人喜好吧对于smarttemplate而言,这种定义是无效的,除非你修改他的代码。
smarttemplate::output中有
include_once ("class.smarttemplateparser.php");smarttemplate::debug中有
include_once ("class.smarttemplatedebugger.php");所用到的模板函数都会在编译后的文件里加上
include_once "smarttemplate_extensions/smarttemplate_extension_fuunctionname.php";如果你不设定include_path而使用define的话,就要把那些地方改做
include_once (XXX."class.smarttemplateparser.php");
....
基本上已经看了一遍了,在此我要感谢你这么大公无私的帮助我在下载的smarttemplate包中有个change.txt
内容如下:
我看不太懂,它说的是要修改哪些地方啊?02.04.2003: Release 1.0.2 Philipp von Criegern <[email protected]> Fixed: Filename of compiled template replaces ':' and '\' to '_' to allow absoulte paths in
windows ('C:\apache\htdocs\tmeplates\hello_world.html') in class.smarttemplate.php (256) Fixed: Global Content Array $_top is deleted after usage in order to allow multiple use of
SmartTemplate class in one script in class.smarttemplate.php (281) Added: Trailing '/' added to $this->temp_dir in class.smarttemplate.php (240)