Fehler in nem Script!
lima-city → Forum → Programmiersprachen → PHP, MySQL & .htaccess
befehl
block
blocken
break
code
datei
fehler
gel
header
hofnarr
http
index
klappen
nennen
output
sagen
show
switch
umbenennen
wissen
-
<?php
if (eregi("block-Treemenu.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
ob_start();
include("treemenu/treemenu/treemenu.inc");
// $tree = new TreeMenu("a", "blocks/treemenu/sitemap.txt");
// $tree->show();
This is the "alternative method" to fill the tree:
$tree2 = new TreeMenu("b");
$tree2->addNode(1, "grandpa");
$tree2->addNode(2, "pa");
$tree2->addNode(3, "son");
$tree2->addNode(2, "uncle");
$tree2->show();
and here is a way to load different Treemenus based on, say,
category id:
// global $catid;
// switch ($catid) {
// case 1:
// $tree = new TreeMenu("a", "blocks/treemenu/category1.txt");
// $tree->show();
// break;
// case 2:
// $tree = new TreeMenu("a", "blocks/treemenu/category2.txt");
// $tree->show();
// break;
// case 3:
// $tree = new TreeMenu("a", "blocks/treemenu/category3.txt");
// $tree->show();
// break;
// }
$output = ob_get_contents();
ob_end_clean();
$content = $output;
?> -
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage
-
<?php
if (eregi("block-Treemenu.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
ob_start();
include("treemenu/treemenu/treemenu.inc");
// $tree = new TreeMenu("a", "blocks/treemenu/sitemap.txt");
// $tree->show();
//This is the "alternative method" to fill the tree:
$tree2 = new TreeMenu("b");
$tree2->addNode(1, "grandpa");
$tree2->addNode(2, "pa");
$tree2->addNode(3, "son");
$tree2->addNode(2, "uncle");
$tree2->show();
//and here is a way to load different Treemenus based on, say,
//category id:
// global $catid;
// switch ($catid) {
// case 1:
// $tree = new TreeMenu("a", "blocks/treemenu/category1.txt");
// $tree->show();
// break;
// case 2:
// $tree = new TreeMenu("a", "blocks/treemenu/category2.txt");
// $tree->show();
// break;
// case 3:
// $tree = new TreeMenu("a", "blocks/treemenu/category3.txt");
// $tree->show();
// break;
// }
$output = ob_get_contents();
ob_end_clean();
$content = $output;
?>
so m?sste es klappen, aber bitte demn?chst sagen was f?r ein fehler etc. -
Also, falls dein gepostetes Script das da ist: http://hofnarr.pyrokar.lima-city.de/treemenu/block-Treemenu.php
dann ist der Include-Befehl falsch: include("treemenu/treemenu/treemenu.inc");
es sollte include("treemenu/treemenu.inc"); heissen.
-
so hab das men? nun fertig! ;) danke an eure hilfe kann nun geclosed werden! :-)
-
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage