Home > Backend Development > PHP Tutorial > 为何控制器这么听话

为何控制器这么听话

WBOY
Release: 2016-06-13 12:16:45
Original
868 people have browsed it

为啥控制器这么听话
phpcms中
header('location:index.php?m=admin');用m就能控制入口进入哪个模块中,比如m=admin进入admin模块,m=abc就能进入 abc模块执行其中的命令,那么这是怎么玩的呢
------解决思路----------------------
$filepath = PC_PATH.'modules'.DIRECTORY_SEPARATOR.$m.DIRECTORY_SEPARATOR.$filename.'.php';  
组织文件路径
 include $filepath;  
引入文件
这么明显了....你要是include 都不知道...没办法

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template