前期准备工作: 1.下载PHPExcel放到vendor下 2.前端页面: <form action="save" method="post" enctype="multipart/form-data"> <div class="time-add clearfix"> <input type="su ...
分类:
数据库 时间:
2019-12-21 09:29:45
阅读次数:
315
sql语句是select left(replace(rq,'-','/'),10) as rq from 表名 tp5.1中的写法 $res = Db::table('表名') ->field("left(replace(rq,'-','/'),10) as rq") ->paginate(20); ...
分类:
数据库 时间:
2019-12-20 11:48:14
阅读次数:
129
1 目录结构的异同 tp5核心框架是项目根目录thinkphp下 , tp6是vendor的topthink 2 安装方式不同,tp6仅能通过composer方式安装 3 类自动加载方式不同 tp6使用composer方式实现类自动加载, tp5 composer+自己实现了一套 4 tp6使用了p ...
分类:
其他好文 时间:
2019-12-18 19:01:55
阅读次数:
1475
```php //1.config目录下新建redis.php '127.0.0.1', 'port' => '6379' ]; //2.extend目录下新建->module文件夹->Redis.php文件 connect(config('redis.host'), config('redis.p... ...
分类:
其他好文 时间:
2019-12-18 14:24:09
阅读次数:
210
$model->where($where)->whereExp('value','>value2')->select() ...
分类:
其他好文 时间:
2019-12-13 19:47:59
阅读次数:
65
$list = $this->agent->where($where) ->withAttr('region',function ($value,$data){ $provice_name = regionIdToName($data['province_id']); $city_name = re ...
分类:
其他好文 时间:
2019-12-12 18:14:35
阅读次数:
567
本文转自:https://www.yunyingxbs.com/article/detail/id/342.html 感谢作者的无私分享! 最近在做项目,使用的是thinkphp5(tp5)开发的,使用tp5内置的分页功能。 那么,问题来了,我使用paginate函数生成分页时,若没有第二页是没有关 ...
分类:
Web程序 时间:
2019-12-06 09:59:05
阅读次数:
110
1.首先进入phpstudy的www目录 composer create-project topthink/think=5.0 pt5.0的名字 --prefer-dist 然后就可以下载成功了 注意:必须要有网络,要有网络,要有网络!!!!!!!!! ...
分类:
其他好文 时间:
2019-12-02 16:54:32
阅读次数:
80
ThinkPHP采用 01-think\facade\Cookie类提供Cookie支持。 02-think\Cookie 配置文件位于 config/cookie.php中,一般会配置一个超时时间。 session 配置文件位于 config/session.php中 ...
分类:
Web程序 时间:
2019-12-02 00:44:13
阅读次数:
162