Huitz Posted April 9, 2006 Share Posted April 9, 2006 Hello, I was wondering if you could help me with this. I keep receiving this error: [b]Fatal error: Cannot redeclare class template in /home3/ghostd0/public_html/includes/template.php on line 36[/b]Here is my template.php coding ( starting from line #36 )[code]class Template { var $classname = "Template"; // variable that holds all the data we'll be substituting into // the compiled templates. // ... // This will end up being a multi-dimensional array like this: // $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value // if it's a root-level variable, it'll be like this: // $this->vars[varname] == value or $this->_tpldata['.'][0][varname] == value // array "vars" is added for easier access to data var $_tpldata = array('.' => array(0 => array())); var $vars;[/code]Can you please tell me what is going wrong? Thank you!! Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 9, 2006 Share Posted April 9, 2006 Basically that error messahge is saying your are declaring the Template class twice. Which you cannot doas you can only declare one class once.If you want to modify the Template class then you'll want to do something like:[code]class Template2 extends Template {// class code here}[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.