By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,830 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,830 IT Pros & Developers. It's quick & easy.

I have developed a web forum and I need help

P: 20
My script is not running, can someone help me.This is the code.
[PHP]<?
//display_tree() Function from output_funs.php
function display_tree($expanded, $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_toolbar()
{
?>
<table width = 90% cellpadding = 4 cellspacing = 0>
<tr>
<td bgcolor = "#cccccc" align = right>
<a href = "new_post.php?parent=0"><img src="images/new-post.gif"
border = 0 width = 99 height = 39></a><a
href = "index.php?expand=all"><img src="images/expand.gif"
border = 0 width = 99 height = 39
alt = "Expand All Threads"></a><a
href = "index.php?collapse=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.php 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]
Feb 16 '07 #1
Share this Question
Share on Google+
1 Reply


ronverdonk
Expert 2.5K+
P: 4,258
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:
Feb 16 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.