Jump to content


This topic is now archived and is closed to further replies.


Fatal Error

Recommended Posts

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!!

Share this post

Link to post
Share on other sites
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


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.