SoFunction
Updated on 2025-03-05

Examples of usage of thinkphp hollow template and empty module

This article describes the usage of thinkphp hollow templates and empty modules. Share it for your reference. The specific implementation method is as follows:

1. Empty operation

Copy the codeThe code is as follows:
function _empty($name){
$this-]show("$name does not exist [a href='__APP__/Index/index'] Return to homepage[/a]");
}

2. Empty module
Copy the codeThe 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.