thinkphp使用
原创 2019-05-02 11:00:27
1139阅读
thinkphp5的layout和以前的版本有点差异。 首先开启配置文件中的 'template' => [ 'layout_on' => true, // 'layout_name'=>'Public/layout' ] layout_on是开启layout,layout name是可以配置lay
原创 2022-04-08 11:26:09
401阅读
使用Composer安装ThinkPHP5
原创 2018-05-17 09:37:34
1725阅读
1点赞
这里使用的是最新版本的thinphp 6.0
原创 2021-08-02 14:03:56
427阅读
php报错PHP Warning:  require(): open_basedir restriction in effect. File(/home/wwwroot/xxx.com/vendor/autoload.php) is not within the allowed path(s): (/home/wwwroot/xxx.com/public/:/tmp/:/proc/) in /ho
转载 2018-11-20 09:52:00
476阅读
2评论
Windows版安装a)使用composer create-project topthink/think testTG,来安装thi
原创 2022-08-18 12:01:59
253阅读
这里使用的是最新版本的thinphp 6.0
转载 2021-08-02 14:03:39
336阅读
ThinkPHP5 隐藏index.php问题 thinkphp模板输出cookie,session中…
原创 2021-07-09 15:08:24
283阅读
混杂模式 $where = []; array_push($where, 'create_user_id=4 or create_user_id=17'); array_push($where, 'province like "山%"'); $where['city'] = array('=', '济南'); ...
原创 2021-08-13 01:01:54
494阅读
thinkphp5中如何使用 usort 一、总结 一句话总结:其实比较函数加上命名空间就好啦,不然找不到 1、php中usort的比较函数怎么写? 二、关于自定义比较函数 usort 如何使用 类中的方法(转) 转自:关于自定义比较函数 usort 如何使用 类中的方法 - qdujunjie的专
转载 2019-04-14 20:28:00
135阅读
它是对数据库的CURD操作事件进行了钩子,当事件触发时,会进行回调。 就像是注册事件和前置方法或后置方法类似 下面是demo 会看到在使用查询的同时执行了查询事件,打印出了 'this is query event ' ,并且先于print_r($user); 其中:回调函数中有两个参数:$opti
原创 2021-07-09 15:06:45
558阅读
,请点击此链接:http://www.dawnfly.cn/article-1-129.html。 在tp5中,虽然也是使用phpmailer来发送邮件,但是有了Compos
转载 2018-06-05 18:53:00
123阅读
composer create-project topthink/think tp5 --prefer-dist
php
原创 2021-07-20 16:17:14
192阅读
smtp.
原创 2022-09-09 10:35:12
353阅读
Thinkphp5学习笔记 架构 Thinkphp5目录架构 thinkphp 应用部署目录 ├─application 应用目录(可设置) │ ├─common 公共模块目录(可更改) │ ├─index 模块目录(可更改) │ │ ├─config.php 模块配置文件 │ │ ├─common ...
转载 2021-09-08 11:44:00
435阅读
2评论
配置tp5 API 在application下配置route use think\Route;Route::domain('域名','文件夹'); 文件夹下的route内添加 use think\Route;Route::domain('域名','文件夹'); 例如: https://api.tes ...
转载 2021-08-08 16:12:00
267阅读
2评论
// 同tp3的getField$result = User::where('status',1)->column('id,name,age', 'id');可以使用column
原创 2021-06-17 12:23:56
612阅读
  'session'           => [     'id'         => '',     // SESSION_ID的提交变量,解决flash上传跨域     'var_session_id' => '',     // SESSION 前缀     'prefix'       => 'think',     // 驱动方式 支持redis memcache memcached     'type'         => 're
原创 2017-05-16 21:07:13
2270阅读
使用事务处理的话,需要数据库引擎支持事务处理。比如 MySQL 的 MyISAM 不支持事务处理,需要使用 InnoDB 引擎。 使用 transaction 方法操作数据库事务,当发生异常会自动回滚,例如: 自动控制事务处理 也可以手动控制事务,例如:
原创 2023-05-15 11:03:58
114阅读
thinkphp5 left join 一、总结 1、作用:left join就是即使不匹配也返回左表中的数据 2、join使用通式:object join ( mixed join [, mixed $condition = null [, string $type = 'INNER']] ) 弄
转载 2018-05-04 15:59:00
673阅读
  • 1
  • 2
  • 3
  • 4
  • 5