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

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

WBOY
WBOYOriginal
2016-06-13 13:44:14751browse

程序不执行$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();

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn