21,886
社区成员
发帖
与我相关
我的任务
分享
class TestController extends Controller{
function index(){
// 获得当前控制器的所有方法
$all_methods = array(); // ['sayName','checkUser']
print_r($all_methods);
}
function sayName(){}
function checkUser(){}
}
$all_methods = get_class_methods(get_class());
干嘛要区分项目版本?
$data = get_class_methods(IndexAction);
echo '<pre>';print_r($data);