Zitat Zitat von Lucleonhart
Kannse mal sehen, war mir nicht sicher ob es file_exists(datei.php) oder file_exists("datei.php") heißt. Naja.
Für alle Haarspalter:
PHP-Code:
 <?php
$action 
$_GET['action'];
if ( 
$action == "" )
{
$action "main";
}


if ( 
file_exists($action."php") )
{
include(
"$action.php");
}else{
include(
"main.php");
}
?>
Jo danke is auf jedenfall kürzer als meins thx

Zitat Zitat von Tomarus
Hm, stimmt aber immer noch nicht ganz

Schließlich willst du gucken, ob die Datei site.php existiert, nicht ob der Ordner sitephp existiert - also wohl eher so:

PHP-Code:
if (file_exists ($action.'.php')) 
Mir war schon so als ob da was nicht wirklich stimmt :P ^^

thx an all die geholfen haben mein kleines prob zu lösen