趙哥-IT网络技术分享-第14页

thinkphp6.0 代码报错集 [收集各种报错解决方法]

thinkphp6.0 代码报错集 [收集各种报错解决方法]-IT网络技术分享
报错代码:Call to undefined method think\Db::table() 解决方法:要引入文件use think\Facade\Db;
3年前
026414

thinkphp6.0 Session

thinkphp6.0 Session-IT网络技术分享
Session 是服务端存储,在使用 Session 之前,需要开启初始化,在中间件文件 middleware.php; // Session 初始化 \think\middleware\SessionInit::class TP6.0 不支持原生$_SESSION 的获取方式...
3年前
052010

thinkphp6.0 cookie

thinkphp6.0 cookie-IT网络技术分享
Cookie 是客户端存储,默认情况下是开启初始化的,在 config/cookie.php: ::set()方法,创建一个最基本的 cookie,可以设置前缀、过期时间、数组等; Cookie::set('user', 'Mr.Lee'); //临时保...
3年前
065215

thinkphp6.0 缓存功能

thinkphp6.0 缓存功能-IT网络技术分享
系统内置了很多类型的缓存,除了 File,其它均需要结合相关产品; 我们这里主要演示 File 文本缓存,其它的需要学习相关产品; 配置文件 cache.php 进行缓存配置,默认生成在 runtime/cache 目...
3年前
07497

thinkphp6.0 上传功能

thinkphp6.0 上传功能-IT网络技术分享
如果要实现上传功能,首先需要建立一个上传表单,具体如下:<form action='http://localhost/tp6/public/upload' enctype='multipart/form-data' method='post'> <input type='file' n...
3年前
087313

thinkphp6 数据库和模型代码智能提示

thinkphp6 数据库和模型代码智能提示-IT网络技术分享
前言: 自thinkphp5.1之后,ThinkPHP6 Db和模型方法提示消失,如何修复?让我们来看看如何修复提高我们开发效率。 DB数据库提示修复: 代码替换位置:第23行以下注释内容 代码: /** * Class Db...
3年前
039913

cookie过期和session超时的区别

cookie过期和session超时的区别-IT网络技术分享
Cookie过期: Cookie由浏览器管理,如果Cookie有过期时间,浏览器会在过期时间将其销毁。如果没有设置过期时间浏览器关闭后Cookie会过期。 Session超时: Session对象由服务器管理,服务器会计...
3年前
02406

小皮面板(phpstudy)上部署 thinkphp项目并成功访问

Flutter屏幕适配 [flutter_screenutil]

Flutter屏幕适配 [flutter_screenutil]-IT网络技术分享
安装依赖: pub地址:https://pub.dev/packages/flutter_screenutil github地址:https://github.com/OpenFlutter/flutter_screenutil dependencies: flutter_screenutil: ^5.5.2 #屏幕适配 使...
3年前
06587

thinkphp6 Filesystem文件系统类的使用

thinkphp6 Filesystem文件系统类的使用-IT网络技术分享
config/filesystem.php配置文件中配置上传根目录及上传规则,例如: return [ 'default' => 'local', 'disks' => [ 'local' => [ 'type' => 'local', 'root' => app()->getRu...
3年前
021536