$planPath = APP_PATH.$modules[$type]['name'].'/controller'; $planList = array(); $dirRes = opendir($planPath); while($dir = readdir($dirRes)) { if(!in_array($dir,array('.','..','.svn'))) { $planList[] = basename($dir,'.php'); } }
$control = 'index'; $className = "app\\admin\\controller\\".$control; // ReflectionClass PHP内置函数,不懂的自己查手册 $methods = (new \ReflectionClass($className))->getMethods(\ReflectionMethod::IS_PUBLIC);