public class Student{
public function speek($name){
echo 'my name is '.$name;
}
}
$method='speek';
$stu_model=new Student();
$stu_model->$stu_model('matt');
其中$method为自己定义的变量
public class Student{
public function speek($name){
echo 'my name is '.$name;
}
}
$method='speek';
$stu_model=new Student();
$stu_model->$stu_model('matt');
其中$method为自己定义的变量
转载于:https://www.cnblogs.com/mawenzhu/p/7784081.html