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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.