应该在198行加,谢谢。现在还又问题,就是无法用使用extensions目录下的textbutton.php。 错误是 Notice: Undefined index: textbutton in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 159Notice: Undefined variable: header in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 161Fatal error: Call to undefined function: smarttemplate_extension_textbutton() in d:\tmp\textbutton_html.php on line 8 也不知道把class.smartbutton.php放在什么地方谢谢
稻草人老大: 还是不行呀!Notice: Undefined index: current_date in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 159Notice: Undefined variable: header in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 161Example of 'current_date' Current Date is: Fatal error: Call to undefined function: smarttemplate_extension_current_date() in d:\tmp\current_date_html.php on line 4
这个header因为前面出错输出了所以会出错 可能你的路径定义得不怎么好。 看下那些路径设置
贴出目录结构 将class.smarttemplateparser.php 中修改如下 159行 if (!$this->extension_tagged[$extension]) =>header = ''; if (empty($this->extension_tagged[$extension]))
错误是
Notice: Undefined index: textbutton in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 159Notice: Undefined variable: header in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 161Fatal error: Call to undefined function: smarttemplate_extension_textbutton() in d:\tmp\textbutton_html.php on line 8
也不知道把class.smartbutton.php放在什么地方谢谢
还是不行呀!Notice: Undefined index: current_date in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 159Notice: Undefined variable: header in d:\usr\www\html\smarttemplet\class.smarttemplateparser.php on line 161Example of 'current_date'
Current Date is:
Fatal error: Call to undefined function: smarttemplate_extension_current_date() in d:\tmp\current_date_html.php on line 4
可能你的路径定义得不怎么好。
看下那些路径设置
将class.smarttemplateparser.php
中修改如下
159行
if (!$this->extension_tagged[$extension]) =>header = '';
if (empty($this->extension_tagged[$extension]))
我并没有修改php.ini的include_path.
在current_date.php的文件包含了一个require_once "..\..\class.smarttemplate.php"
var $template_dir = '';
怎样写,反正我是没有写。我试验了一下,examples目录下的basic与control_structures目录下的例子运行正确。
但是extensions目录下的例子一个也没又运行。