|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
dirtdrgn Smarty n00b
Joined: 05 Nov 2003 Posts: 3
|
Posted: Wed Nov 05, 2003 11:44 pm Post subject: Weird install errors... |
|
|
I continually get errors such as:
Fatal error: Call to undefined function: assign() in /somewhere/index.php on line 14
No matter what functions I use, it gives me the same error.
index.php:
<?php
require_once('/somewhere/include/meta.php');
if ($action="") {
$action = "main";
}
$smart->assign('date',date("l, F j Y"));
/* if(file_exists("{$action}.tpl")) {
$smart->display('{$action}.tpl');
}
else { */
$smart->display('index.tpl');
// }
?>
meta.php
<?php
// Template System Require
define('SMARTY_DIR','/somewhere/smarty/');
require('/somewhere/smarty/Smarty.class.php');
$smart = new Smarty;
$smart = $use_sub_dirs = false;
$smart = $caching = false;
$smart->template_dir = '/somewhere/smarty/templates';
$smart->compile_dir = '/somewhere/smarty/templates_c';
$smart->config_dir = '/somewhere/smarty/configs';
$smart->cache_dir = '/somewhere/smarty/cache';
$smart->left_delimiter = '<{';
$smart->right_delimiter = '}>';
$smart->compile_check = true;
$smart->debugging = true;
print_r($smart);
function query ($string) {
if ($result[$string]=="") {
$result[$string] = mysql_query($string);
}
$retval = mysql_fetch_array($result[$string]);
return $retval;
}
?>
(Somewhere is just cutting out private location info.)
If there's anything I forgot to post, just ask me for it. Oh yeah, safe mode is on. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Nov 06, 2003 12:51 am Post subject: |
|
|
I think these two lines are clobbering your smarty instance
$smart = $use_sub_dirs = false;
$smart = $caching = false;
should be:
$smart->use_sub_dirs = false;
$smart->caching = false;
HTH |
|
Back to top |
|
dirtdrgn Smarty n00b
Joined: 05 Nov 2003 Posts: 3
|
Posted: Thu Nov 06, 2003 1:13 am Post subject: |
|
|
Whoops! Lemme fix that...
I'm such a dummy...thank you! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|