sie dan mit in_array überprüfen ich bekomme das aber nicht so hin.
PHP Code:
glob($filePath."*.php");
da einbinden:
PHP Code:
$filePath = ".".DIRECTORY_SEPARATOR."scripts".DIRECTORY_SEPARATOR."pages".DIRECTORY_SEPARATOR;
if(isset($_GET['page']) && !empty($_GET['page'])) {
$getFile = str_replace("\0", '', $_GET['page']);
$includeFile = realpath($filePath.$getFile.'.php');
if(file_exists($includeFile) && is_readable($includeFile)) {
include_once($includeFile);
} else {
include_once($filePath.'404.php');
}
} else {
include_once($filePath.'home.php');
}






