摘要: <?php header("Content-type:text/html;charset=utf-8"); /** * 第一步,分别实例化 */ /*class Single { function __construct() { # code... } } $s1 = new Single(); $ 阅读全文
posted @ 2020-01-11 22:20 A毛毛 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 实现不修改原代码,扩展新功能 <?php header("Content-type:text/html;charset=utf-8"); /** * db接口 * 实现连接数据库函数conn */ interface db { function conn(); } /** * 工厂接口 * 实现创建 阅读全文
posted @ 2020-01-11 21:07 A毛毛 阅读(149) 评论(0) 推荐(0) 编辑
摘要: <?php header("Content-type:text/html;charset=utf-8"); /** * 共同接口 */ interface db { function conn(); } /** * mysql类 */ class DbMysql implements db { pu 阅读全文
posted @ 2020-01-11 20:37 A毛毛 阅读(270) 评论(0) 推荐(0) 编辑
摘要: <?php header("Content-type:text/html;charset=utf-8"); /** * 共同接口 */ interface db { function conn(); } /** * mysql类 */ class DbMysql implements db { pu 阅读全文
posted @ 2020-01-11 20:22 A毛毛 阅读(374) 评论(0) 推荐(0) 编辑
摘要: <?php header("Content-type:text/html;charset=utf-8"); /** * 虎 */ abstract class Tiger { public abstract function climb(); } /** * x虎 */ class Xtiger e 阅读全文
posted @ 2020-01-11 19:59 A毛毛 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1 安装go-redis 2 // 安装命令 3 go get github.com/gomodule/redigo/redis 4 // 导入使用 5 import( 6 "github.com/gomodule/redigo/redis" 7 ) 8 // go操作redis文档 9 https 阅读全文
posted @ 2020-01-11 17:15 A毛毛 阅读(1246) 评论(0) 推荐(0) 编辑
摘要: 本文只针对Nginx在不加载第三方模块的情况能处理哪些事情,由于第三方模块太多所以也介绍不完,当然本文本身也可能介绍的不完整,毕竟只是我个人使用过和了解到过得。 Nginx能做什么 反向代理 负载均衡 HTTP服务器(包含动静分离) 正向代理 以上就是我了解到的Nginx在不依赖第三方模块能处理的事 阅读全文
posted @ 2020-01-11 10:33 A毛毛 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 原文:https://www.imooc.com/article/20411 公众号引用:https://mp.weixin.qq.com/s/4kDotmsmrd8YP26pZ2s8lw 阅读全文
posted @ 2020-01-11 10:21 A毛毛 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 在使用Docker创建了容器之后,如何进入该容器呢? 进入Docker容器比较常见的几种做法如下: 使用docker attach 使用SSH 使用nsenter 使用exec 一、使用docker attach进入Docker容器 Docker提供了attach命令来进入Docker容器。 接下来 阅读全文
posted @ 2020-01-11 09:25 A毛毛 阅读(8289) 评论(0) 推荐(0) 编辑
摘要: // User 用户表 type User struct { ID int UserName string Password string Articles []*Article `orm:"rel(m2m)"` } // Article 文章表 type Article struct { ID i 阅读全文
posted @ 2020-01-11 00:00 A毛毛 阅读(2672) 评论(0) 推荐(0) 编辑