Jump to content

Fatal Error


Huitz

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!!
Link to comment
https://forums.phpfreaks.com/topic/6928-fatal-error/
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

}[/code]
Link to comment
https://forums.phpfreaks.com/topic/6928-fatal-error/#findComment-25179
Share on other sites

Archived

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

×
×
  • Create New...

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.