Re: [SMARTY] Smarty 2.2.0 undefined function?
| From: | Tim Parkin | Date: | Sun, 28 Jul 2002 16:42:08 +0000 |
| Subject: | Re: [SMARTY] Smarty 2.2.0 undefined function? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5478@lists.php.net to get a copy of this message | ||
I'm having the same problems as the people below.
I'm having a similar bug which goes away if I define the SMARTY_DIR
constant.
However, I'm repeatedly getting an 'unterminated string error' when I use
debugging.
The error is returned in the debug.tpl
_smarty_console.document.write("<tr bgcolor=#fafafa><td
colspan=2><tt><font
color=brown>box.tpl</font> <font size=-1><i>(<br />
<b>Notice</b>: Undefined index: exec_time in
<b>d:\www.broadcrown.com\src\web\templates_c\N75\N759808900\0.php</b> on
line <b>78</b><br />
0.00000)</i></font></tt></td></tr>");
is it something I am doin wrong.. I'm going to try a few things and I'll
come back if I get anywhere
Tim Parkin
"Jaime Ashander" <JaimeA@dis-corp.com> wrote in message
news:E83B3366406CAD4DA7B5F53303BD71CB94DD69@disbham.dis-corp.com...
>The problem in my case was that i had to put
>{include_php file="file:smartyscripts/toplist.php"}
>
>instead of
>
>{include_php file="smartyscripts/toplist.php"}
Isn't that only an issue when you are componentizing your scripts? The
stability of 2.2.0 shouldn't depend on including this.
Strangely enough I just updated my current directory tree via cvs to
full 2.2.0 and somehow it worked. I think there was some parts of old
versions lingering. Here is my directory tree:
C:\
\Inetpub\
\smarty\
\docs\
\mydocs\
\cache\
\templates_c\
\configs\
\misc\
\plugins\
\wwwroot\
\mydocs\
\templates\
index.tpl
myscript.php
mysmarty.inc
then I subclass smarty like this to call it with the correct dirs:
mysmarty.php:
define (SMARTY_DIR,'c:\Inetpub\smarty\\');
require (SMARTY_DIR.'Smarty.class.php');
class My_Smarty extends Smarty {
// boolean variable
var $reload_flag;
// call constructor
function My_Smarty ($reload_fg = false) {
$this->Smarty();
// setup Smarty configs for your app
$this->caching=true;
$this->compile_dir = 'c:\Inetpub\smarty\mydocs\templates_c\\';
$this->config_dir = 'c:\Inetpub\smarty\mydocs\configs\\';
$this->cache_dir = 'c:\Inetpub\smarty\mydocs\cache\\';
}
}
myscript.php:
require_once 'mysmarty.inc';
$smarty = new My_Smarty();
//do stuff
index.tpl:
{* display stuff *}