Thinkphp5.1 new module

First, the new module zxf

1, module access opening
D: \ phpStudy \ PHPTutorial \ the WWW *** \ config \ app.php
// allow access module
'allow_module_list' => [ 'RUN', 'Home', 'zxf'],
2, controller module base class
D: \ phpStudy \ PHPTutorial \ WWW \ test \ app \ common \ controller \ Zxf.php

<?php namespace app\common\controller; use woo\controller\WooZxf; /** * 自己应用后台的核心控制器 */ class Zxf extends WooZxf { }
3,父类控制器 D:\phpStudy\PHPTutorial\WWW\test\woo\controller\WooZxf.php <?php namespace woo\controller; use woo\utility\Hash; use woo\utility\TpText; class WooZxf extends WooApp{ public function __construct() { call_user_func(array('parent', __FUNCTION__)); } protected function initialize() { call_user_func(array('parent', __FUNCTION__)); } protected function beforeFinish() { call_user_func(['parent', __FUNCTION__]); } } ?>
Published 58 original articles · won praise 0 · Views 2759

Guess you like

Origin blog.csdn.net/qq_30439399/article/details/102580770