人五人六博客网
导航
首页
thinkPHP
数据库
Linux
PHP
前端
杂七杂八
每日简报
浏览器书签
搜索
首页
标签
tp
2023/6/2
thinkPHP
tp5.1 Workerman 配置websocket支持wss
protected $socket = 'websocket://0.0.0.0:2346'; //监听协议、地址、和端口 protected $context = [ 'ssl' => [ 'lo...
676阅读
0评论
2023/5/18
PHP
TP5 Indirect modification of overloaded element of think\Collection has no effect
在tp5中对查询的数据进行赋值是出现这个问题 $data=Db::name("user")->select(); foreach($data as $k => $v){ $data[$k]['num']=$k+1; } 解决...
742阅读
0评论
2023/4/19
thinkPHP
tp5 数据表字段为逗号分隔的字符串,查询该字段中是否包含某个值
例:数据表cid字段为1,2,34,5,6,7,8,9,10,11 需求:需要查询cid为1的数据 解决:使用find_in_set(查找值,字段名) Db::table('think_user') ->where('find_in_set(1,...
838阅读
0评论
2022/10/31
PHP
tp5.1 对sqlserver数据库进行备份、恢复备份操作
//执行备份 $link = Db::connect(数据库配置 array); $link->execute("backup database LKTEST to disk='备份目录/备份文件'"); //恢复备份 $link->execu...
502阅读
0评论
没有更多了~