摘要: SQL插入数据并返回刚插入数据行的主键IDINSERT INTO `peoplespublic`.`demo` (`id`, `name`, `content`, `time`, `file`)VALUES(NU... 阅读全文
posted @ 2020-02-18 20:26 江湖艺人 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 方法一//不需要引入,直接开干public function Transaction(){ DB::beginTransaction(); //开启事务 sql1=DB::table(′demo′)−>whe... 阅读全文
posted @ 2020-02-18 20:24 江湖艺人 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 配置session配置文件位于config/session.hpp 默认情况下使用session驱动为文件驱动,在生产环境中,建议使用memcache或者redis驱动以便获取更快的session性能。其它Ses... 阅读全文
posted @ 2020-02-18 20:22 江湖艺人 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 方法一:info=DB::table(′表名′)−>insertGetId([′imgName′=>info=DB::table(′表名′)−>insertGetId([′imgName′=>fileName])... 阅读全文
posted @ 2020-02-18 20:21 江湖艺人 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 创建控制器: php artisan make:controller Admin/IndexController创建Middleware: php artisan make:middleware TestMidd... 阅读全文
posted @ 2020-02-18 20:19 江湖艺人 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 如果以开发环境上线,出错信息将全通过json暴露出来了,屏蔽方式如下:.env 文件设置如下APP_ENV=productionAPP_DEBUG=false改完设置后把缓存清理一遍如果更改后清除缓存还是不行,可... 阅读全文
posted @ 2020-02-18 20:18 江湖艺人 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 关键点1.img中的src的字符串动态拼接 2.style中的background属性赋值 一.img中的src的字符串动态拼接 1.问题是这样子的,瞧瞧 基本网络链接 : http://openweathe... 阅读全文
posted @ 2020-02-18 00:24 江湖艺人 阅读(1983) 评论(0) 推荐(0) 编辑