<?phpdefine('CAKE_ROOT', "/events");uses('folder'); $controllers = new Folder(CONTROLLERS); $list = $controllers->ls();$controllerList = $list[1]; // The list of the files in the controller directory// replace the text in $controllerList that matches the keys in the following array with the key's value:$removeEntries = array("_controller.php" => "", "controller_template.php" => "", "registrations_controller~.php" => ""); foreach($removeEntries as $key=>$value){ $controllerList = str_replace($key, $value, $controllerList);}$html = "<ul>\n";foreach($controllerList as $val){ if(!empty($val)) { $html .= "\t<li><a href=\"". CAKE_ROOT ."/$val\">".str_replace("_", " ", $val)."</li>\n"; }}$html .= "</ul>\n";echo $html;?>