Re: Smarty syntax for require?



laredotornado@xxxxxxxxxxx escribió:
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");

Where did you read about require? I can't find it in the Smarty manual:

http://www.smarty.net/manual/en/


(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?

You assume it's related to PHP in some way? Is that all you know about it? Oh well, good luck xD

BTW, you can find the official forums at http://www.phpinsider.com/smarty-forum/



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
.



Relevant Pages

  • 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)
  • Re: Python vs PHP
    ... PHP is itself a template language, ... Many people seems to be frustrated with Smarty syntax. ... But my personal point of view is, that Smarty is the best PHP template ... I compare Smarty with Cheetah. ...
    (comp.lang.python)