安装官方给的demo,在build.php文件中 <?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- // | Copyright (c) 2006~201
以user为例,调用user.php的get_number()方法 一.不管是调用自身模块还是其他模块app\model\User.php写法不变 <?php namespace app\index\model; use think\Model; class user extends Model { public function get_member(){ return 3; } } 二.user控制器调用user模块(即控制器调用自身模块) <?php namespace app\inde
<?php namespace app\index\controller; use think\Db; use think\Controller; class Base extends Controller { public function _initialize(){ $no_check = array("login","login_check"); $request = \think\Request::instance(); echo $request-