I have developed a web forum and I need help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muchexie
    New Member
    • Feb 2007
    • 20

    I have developed a web forum and I need help

    My script is not running, can someone help me.This is the code.
    [PHP]<?
    //display_tree() Function from output_funs.php
    function display_tree($e xpanded, $row = 0, $start = 0)
    {
    // display the tree view of conversations

    global $table_width;
    echo "<table width = $table_width>";

    // see if we are displaying the whole list or a sublist
    if($start>0)
    $sublist = true;
    else
    $sublist = false;

    // construct tree structure to represent conversation summary
    $tree = new treenode($start , '', '', '', 1, true, -1, $expanded, $sublist);

    // tell tree to display itself
    $tree->display($row , $sublist);

    echo "</table>";
    }
    ?>
    <?
    function display_index_t oolbar()
    {
    ?>
    <table width = 90% cellpadding = 4 cellspacing = 0>
    <tr>
    <td bgcolor = "#cccccc" align = right>
    <a href = "new_post.php?p arent=0"><img src="images/new-post.gif"
    border = 0 width = 99 height = 39></a><a
    href = "index.php?expa nd=all"><img src="images/expand.gif"
    border = 0 width = 99 height = 39
    alt = "Expand All Threads"></a><a
    href = "index.php?coll apse=all"><img
    src="images/collapse.gif" border = 0 width = 99
    height = 39 alt = "Collapse All Threads"></a>
    </td>
    </tr>
    </table>
    <?php
    }
    ?>[/PHP]
    This is the error I'm getting.
    Fatal error: Cannot instantiate non-existent class: treenode in C:\project\test \output_funs.ph p on line 17
    The line of code in question is this one.
    [PHP]
    $tree = new treenode($start , '', '', '', 1, true, -1, $expanded, $sublist);
    [/PHP]
    Thanks for time you share with me.[HTML][/HTML]
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    That class cannot be found. So probably you have forgotten to include it in your script or mistyped the path to, or the name of, the class file.

    Ronald :cool:

    Comment

    Working...