thinkphp5单一上传和批量上传

<?php namespace app\before\controller; use think\facade\Request; class Upload { public function Index() { $file = Request::file('file'); $info = $file-&...
Genius 发布于 

thinkphp5 模型获取器

控制层 <?php namespace app\before\controller; use think\Controller; use think\Db; use app\before\model\Article as ArticleModel; class Article extends Controller { public func...
Genius 发布于 

thinkphp5 模型新增/批量删除 闭包删除

控制文件: <?php namespace app\before\controller; use think\Controller; use think\Db; use app\before\model\Article as ArticleModel; class Article extends Controller { public fu...
Genius 发布于 

thinkphp5 子查询 闭包查询

<?php namespace app\before\controller; use think\Controller; use think\Db; //use app\before\model\Article; class Before extends Controller { public function Index() { $sj = ...
Genius 发布于 

thinkphp5 增删改查

<?php namespace app\before\controller; use think\Controller; use think\Db; //use app\before\model\Article; class Before extends Controller { public function Index() { ...
Genius 发布于 

thinkphp5 查询数据库

控制层文件 <?php namespace app\before\controller; use think\Controller; use think\Db; use app\before\model\Article; class Before extends Controller { public function Index() ...
Genius 发布于 

thinkphp5空方法检查

<?php namespace app\test\controller; use think\Controller; class YangZheWei { public function _empty($name) { return '此方法不存在:<br>'.$name; } } ?>
Genius 发布于 

thinkphp5判断跳转

<?php namespace app\test\controller; use think\Controller; class YangZheWei extends Controller { protected $flag = false; public function index() { if($thi...
Genius 发布于 

thinkphp5 初始化灵活方法

<?php namespace app\test\controller; use think\Controller; class YangZheWei extends Controller { protected $beforeActionList = [ 'than', 'first' => ['exce...
Genius 发布于 

thinkphp5 初始化

<?php namespace app\test\controller; use think\facade\Env; use think\Controller; class YangZheWei extends Controller { protected function initialize(){ parent::initialize(); ech...
Genius 发布于