Re: Smarty syntax for require?



laredotornado@xxxxxxxxxxx wrote:
Hi,

I'm using PHP 5. I'm trying to modify a TPL file by adding this
line ...

{ require("../util_fns.php"); }

and I'm getting this error

Fatal error: Smarty error: [in easyorder/header.tpl line 1]: syntax
error: unrecognized tag: require("../util_fns.php");
(Smarty_Compiler.class.php, line 439) in /usr/local/apache2/htdocs/
super_admin_rs/whmcs/libs/Smarty.class.php on line 1095

So I'm new to Smarty but assume its related to PHP in some way. What
is the proper syntax for require/include?

Thanks, - Dave

Try the Smarty support groups. They know how Smarty works, better than anyone in this newsgroup.

When working with tools and products, the support structure for that tool/product is almost always the place to start.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Smarty syntax for require?
    ... I'm trying to modify a TPL file by adding this ... So I'm new to Smarty but assume its related to PHP in some way. ...
    (comp.lang.php)
  • Re: New template engine - retry
    ... is an improvement over Smarty (and the other, newer, template engines ... tell me why you think this template is better ... There are two central points where I believe mplate is different from ... other PHP template engines. ...
    (comp.lang.php)
  • Re: New template engine - retry
    ... is an improvement over Smarty (and the other, newer, template engines ... than other template systems. ... There are two central points where I believe mplate is different from ... other PHP template engines. ...
    (comp.lang.php)
  • Re: A better XSS trap (Feedback wanted)
    ... Actually I thought about having a default escape method using __toString ... __toString default filter, but I do not recommend it. ... Smarty, expect that mplate seems to put a Smarty-like syntax closer to ... Why not use pure PHP ...
    (comp.lang.php)
  • New template engine - retry
    ... Some of you may remember an earlier post about a smarty-esque PHP ... "mplate, a PHP template engine that Doesn't Suck" (or at least, ... is an improvement over Smarty (and the other, newer, template engines ... How do I convince others without becoming a ...
    (comp.lang.php)