Usage examples of thinkphp hollow templates and empty modules, thinkphp hollow
The examples in this article describe the usage of thinkphp hollow templates and empty modules. Share it with everyone for your reference. The specific implementation method is as follows:
1. No operation
Copy code The code is as follows:
function _empty($name){
$this-]show("$name does not exist [a href='__APP__/Index/index']Return to the homepage[/a]");
}
2. Empty module
Copy code The code is as follows:
class EmptyAction extends Action{
function index(){
$city=M('City');
$arr=$city-]select();
$this-]assign('list',$arr);
$name=MODULE_NAME;//Get the module name of the current address bar
$this-]display("City:$name");//Reference the corresponding module
}
}
I hope this article will be helpful to everyone’s ThinkPHP framework programming.
http://www.bkjia.com/PHPjc/917681.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/917681.htmlTechArticleUsage examples of thinkphp hollow templates and empty modules, thinkphp hollow This article describes the usage of thinkphp hollow templates and empty modules . Share it with everyone for your reference. The specific implementation methods are as follows...