Просмотр поста

.
Windler
<?php
$array = array (
    'new' => '',
);
$path = !empty($array[$act]) ? $array[$act] . '/' : '';
if (array_key_exists($act, $array) && file_exists($path . $act . '.php')) {
    require_once($path . $act . '.php');
} else {
}
?>
Например из JohnCMS.