一、阅读释疑 ■ Bungee jumping looks like fun. 主:Bungee jumping(动名词作主语,表已知的事实或经验。) 谓:look like。 宾:fun. 感官动词之后一律用形容词(或可作形容词用的分词)作表语。 感官动词后绝不可用名词作表词,因为其本身为不及物动 ...
分类:
其他好文 时间:
2020-09-18 17:17:15
阅读次数:
44
<?php namespace app\admin\controller; use think\Controller; use think\DB; class Index extends Controller { // public function _initialize() // { // if ...
分类:
其他好文 时间:
2020-09-18 04:13:46
阅读次数:
52
恢复内容开始 TP5是MVC模式,只要URL中能包含,模块/控制器/方法/参数等等这些东西,就可以返回一个页面了。 一个单页,可以随便用mvc的方式来做。 一个网站,不仅仅包含一个单页,那么我们如何管理多页面的网站呢? 按照思路,肯定要配置很多路由才对,那么tp5还有很多cms站点,其实,都是通过栏 ...
分类:
Web程序 时间:
2020-09-17 21:34:48
阅读次数:
40
一,修改配置文件 Library/ThinkPHP/Conf/convention.php SESSION_TYPE => "redis" 二,添加session redis驱动 Library/ThinkPHP/Think/Session/Driver/Redis.class.php <?phpn ...
分类:
其他好文 时间:
2020-09-17 14:14:49
阅读次数:
47
最近用到thinkPHP5链表查询比较多,但是链表查询如何打印sql语句怎么试都不对,所以研究了一下usethink\Db;dump(Db::table(‘table_name‘)->getLastSql());或者usethink\Db;dump(Db::getLastSql());
分类:
数据库 时间:
2020-09-09 19:18:11
阅读次数:
85
Motivation The task of finding nearest neighbours is very common. You can think of applications like finding duplicate or similar documents, audio/vid ...
分类:
其他好文 时间:
2020-07-29 10:07:50
阅读次数:
68
搜索依然爆炸的烂,继续加油吧。 题解:按照 h 排序的大根堆,每次寻找四周 h 小的接上dp串。 #include <iostream> #include <queue> #include <algorithm> using namespace std; /* * time: 2020.7.23 * ...
分类:
其他好文 时间:
2020-07-23 23:26:22
阅读次数:
94
thinkphp6 关联模型如何查询已经软删除的数据 <?php namespace app\woman\model; use think\Model; use think\model\concern\SoftDelete; class Woman extends Model { use SoftD ...
分类:
Web程序 时间:
2020-07-21 21:44:44
阅读次数:
192
模型设置数据表 <?php namespace app\index\model; use think\Model; class Product extends Model{ public function getStatusAttr($value) { $status = [-1=>'删除',0=> ...
分类:
其他好文 时间:
2020-07-20 15:51:21
阅读次数:
91
修改器的作用是可以在数据赋值的时候自动进行转换处理 class Product extends Model{ public function setNameAttr($value) { return strtolower($value); } } $user = new Model(); $user ...
分类:
其他好文 时间:
2020-07-20 15:45:16
阅读次数:
67