Usage examples of thinkphp hollow templates and empty modules, thinkphp hollow_PHP tutorial

WBOY
Release: 2016-07-13 10:13:01
Original
862 people have browsed it

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.

www.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...
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