路由简介 什么是路由? 将用户的请求按照事先规划的方案提交给指定的 控制器 和 方法来进行处理。 Thinkphp框架提供了两种路由规则 ? pathinfo模式 ? 自定义路由规则【推荐】 进而可以让URL更规范以及优雅,提高网站的安全和网站URL访问的友好度。 Route类注册使用think\f ...
分类:
Web程序 时间:
2020-05-21 17:44:17
阅读次数:
69
参考方法:https://www.jianshu.com/p/31f6e0642b4c TP5 PDO 使用: https://blog.csdn.net/weixin_36691991/article/details/90412843 PDO 预定义: https://www.runoob.com ...
分类:
Web程序 时间:
2020-05-19 20:39:07
阅读次数:
174
// 官网商品链接 public function index(){ $goods_name = I('goods_name'); // goods_name $goodslist = Db::name('goods')->field('goods_id,goods_name,goods_conte ...
分类:
Web程序 时间:
2020-05-18 20:32:41
阅读次数:
71
在尝试使用我的office 365 E5开发者账号使用phpmailer进行发件时,被535 5.7.3 authentication unsuccessful这个错误困扰了很久,在国内外网站找了非常多的资料,可用的很少。这个错误很容易被理解为用户名密码错误,但是若十分确定用户名密码准确无误,极可能 ...
分类:
Web程序 时间:
2020-05-14 19:10:50
阅读次数:
268
class User extends Model { // 定义时间戳字段名 protected $createTime = 'create_at'; protected $updateTime = 'update_at'; } 下面是修改字段后的输出代码: $user = new User(); ...
分类:
其他好文 时间:
2020-05-13 11:59:39
阅读次数:
60
数据表结构如下: 控制器核心代码: <?php namespace app\index\controller; use think\Controller; class Goods extends Controller { public function product_category() { re ...
分类:
Web程序 时间:
2020-05-10 21:28:25
阅读次数:
68
Db::table('think_user') ->where('id','>',1) ->where('name','thinkphp') ->select(); Db::field('user.name,role.title') ->table('think_user user,think_ro ...
分类:
其他好文 时间:
2020-05-08 09:50:38
阅读次数:
53
一、PHP主流框架介绍 主流的框架有laravel、symfony、thinkphp MVC和三层结构 MVC可以说是一种开发模式,三层结构是一种开发习惯,严格来讲,他们两者是完全不同的概念,但是在实际开发当中又有各种联系; MVC是一种将视图、控制器、数据三种分开的一种开发模式。 M - Mode ...
分类:
Web程序 时间:
2020-05-04 21:02:48
阅读次数:
81
FastAdmin 社区精华文章 FastAdmin 是一款基于 ThinkPHP + Bootstrap 的极速后台开发框架 官网:https://www.FastAdmin.net 问答:https://ask.FastAdmin.net Git 仓库:https://gitee.com/kar ...
分类:
其他好文 时间:
2020-05-01 01:28:12
阅读次数:
94
环境介绍 thinkphp6+mysql8+cnetos8 1,已配置好的主从复制数据库,详情请了解 https://www.cnblogs.com/stronger xsw/p/12785384.html 2,打开thinkphp项目下config目录配置文件database.php文件 tp6项 ...
分类:
Web程序 时间:
2020-04-28 13:14:17
阅读次数:
65