当前位置:Gxlcms > PHP教程 > 程序不执行$run=new$mod();就不执行啦!是什么原因解决方案

程序不执行$run=new$mod();就不执行啦!是什么原因解决方案

时间:2021-07-01 10:21:17 帮助过:23人阅读

程序不执行$run = new $mod();就不执行啦!是什么原因
$mod = isset($_GET['m']) ? ucfirst($_GET['m']) : 'Index'; //默认加载Index 函数isset ucfirst() 首字母大写
$mod .= "Action";
$run = new $mod();
$run->run();

------解决方案--------------------
$run = new $mod();
$run->run();

new mod();

人气教程排行