A
andyK
Hallo,
ich habe zwei PHP Dateien.
In der einen (class.popups.php) sind mehrere Klassen:
Die zweite PHP Datei sieht so aus:
Wenn ich nun folgenden Link aufrufe
<a href="popups.php?seite=format">Format</a>
passiert nichts. Gar nichts!
Wenn ich aber den switch entferne und stattdessen
schreibe, wird das Template geöffnet.
Warum geht das mit dem switch nicht?
ich habe zwei PHP Dateien.
In der einen (class.popups.php) sind mehrere Klassen:
PHP:
class all
{
function standard($inhalt)
{
global $conf, $all;
$tpl = tplload("popups.tpl");
echo tplprint($tpl, array_merge(array(
"inhalt" => $inhalt)) );
exit;
}
}
class format
{
function getsite()
{
global $conf, $HTTP_GET_VARS, $all;
$inhalt = "hallo";
return $inhalt;
$all->standard($inhalt);
}
}
// usw.
Die zweite PHP Datei sieht so aus:
PHP:
<?php
require("lib/class.popups.php");
require("lib/class.calc.php");
$all = new all;
switch($HTTP_GET_VARS["seite"])
{
case "format": $configure= new format; break;
case "deckung": $configure = new deckung; break;
case "papier": $configure = new papier; break;
case "veredelung": $configure = new veredelung; break;
case "edit": $configure = new edit; break;
case "more_edit": $configure = new more_edit; break;
default: $all->standard($configure->getsite());
}
Wenn ich nun folgenden Link aufrufe
<a href="popups.php?seite=format">Format</a>
passiert nichts. Gar nichts!
Wenn ich aber den switch entferne und stattdessen
PHP:
$all = new all;
$format = new format;
$all->standard($format->getsite());
schreibe, wird das Template geöffnet.
Warum geht das mit dem switch nicht?
Zuletzt bearbeitet von einem Moderator: