ok, habs jetzt mal soweit geändert:
switch ($location) {
case '':
$location = "news/index";
break;
}also, jetzt gehts (auch wenn nichts angegeben ist) am Anfang immer gleich zu news/index.php . (problem gelöst9
aber was ist wenn jetzt eben jemand für $location ein nicht existierenden Pfad angibt? Dann gibts wieder einen PHP Error... :(
mfg
http://at.php.net/manual/de/control-structures.switch.php
switch ($_REQUEST['style']) {
case '':
include ('styles/standard.txt');
break;
case 'red':
include ('styles/red.txt');
break;
case 'green':
include ('styles/green.txt');
break;
case 'blue':
include ('styles/blue.txt');
break;
default:
include ('styles/standard.txt');
}