上一页 1 2 3 4 5 6 7 8 ··· 39 下一页

2024年1月19日

摘要: 软删除 namespace app\model; use think\Model; use think\model\concern\SoftDelete; class User extends Model { // 开启软删除 use SoftDelete; // 软删除 给数据标记已删除 但不是真 阅读全文
posted @ 2024-01-19 01:34 完美前端 阅读(114) 评论(0) 推荐(0)

2024年1月18日

摘要: 定义/设置 模型 定义一个和数据库表对应的模型文件 在app文件夹下新建model文件夹,在创建php类,取名要和表名,如表名为tp_user模型取名为User,表名为tp_user_name模型取名为UserName --php namespace app\model; use think\Mod 阅读全文
posted @ 2024-01-18 03:00 完美前端 阅读(330) 评论(0) 推荐(0)
摘要: 索引数组查询 $user = Db::name('user')->where([ ["id", ">", 0], ["id", "<", 8] ])->select(); return json($user); 阅读全文
posted @ 2024-01-18 02:31 完美前端 阅读(50) 评论(0) 推荐(0)
摘要: thinkphp 表达式查询 // 表达式查询 // where('字段名', '表达式', '查询条件') // 查询id 大于 3 的数据 // $user = Db::name('user')->where('id','>', 3)->select(); // 模糊查询 // $user = 阅读全文
posted @ 2024-01-18 01:17 完美前端 阅读(48) 评论(0) 推荐(0)

2024年1月17日

摘要: 获取当前路由信息 use app\BaseController; // 引入控制器 public function index() { // 返回当前实际路径 return $this->app->getAppPath(); // 返回当前方法名 // return $this->request-> 阅读全文
posted @ 2024-01-17 22:19 完美前端 阅读(207) 评论(0) 推荐(0)
摘要: thinkphp 服务器环境找不到路由 按照tp官方文档的url重写部份,按照文档设置,不同的是把public下面的.htaccess文件的 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 改为 RewriteRule ^(.*)$ index.php [L,E 阅读全文
posted @ 2024-01-17 19:09 完美前端 阅读(637) 评论(0) 推荐(0)

2024年1月16日

摘要: 阅读全文
posted @ 2024-01-16 21:54 完美前端 阅读(12) 评论(0) 推荐(0)
摘要: 找到php版本文件夹下面的 php.ini 文件,开启如下字段: zend_extension=opcache 修改如下字段: [opcache] ; Determines if Zend OPCache is enabled opcache.enable=1 ; Determines if Zen 阅读全文
posted @ 2024-01-16 21:10 完美前端 阅读(233) 评论(0) 推荐(0)

2024年1月8日

摘要: https://html2canvas.hertzen.com/npm install --save html2canvasyarn add html2canvas<!--h5和app中截图页面保存--><script setup>import { ref } from 'vue'import { 阅读全文
posted @ 2024-01-08 04:28 完美前端 阅读(1852) 评论(0) 推荐(0)

2023年12月15日

摘要: 其实我也是最近遇到这个问题,我发现 0.000000001 这样的数字会被转成科学计数法 1e-8类似这样的,但是小数点前面要是有一个非0的数字就不会自动转了,所以我是这么搞的,测试了常见的浏览器没有啥问题: let num = 0.00000001; let result = String(num 阅读全文
posted @ 2023-12-15 21:18 完美前端 阅读(285) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 39 下一页

导航