摘要: 应用场景:给前台cookie加密 使用环境:tp5 使用方法 以下代码在extend\Lib\Haxi.php <?php namespace lib; use think\Controller; class Haxi extends Controller{ //加密函数(参数:数组,返回值:字符串 阅读全文
posted @ 2020-03-12 19:22 super久违 阅读(1444) 评论(1) 推荐(0) 编辑
摘要: tip谈不上倒是老是忽略这个东西,去操作的数据究竟是一个数组还是一个数据 阅读全文
posted @ 2020-03-12 17:40 super久违 阅读(133) 评论(0) 推荐(0) 编辑
摘要: $time = date("Y-m-d H:i:s");$res['time'] = ceil((strtotime($time)-strtotime($res['time']))/86400); 阅读全文
posted @ 2020-03-12 15:04 super久违 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 最近写了一个推送接口的工作需求,来记录一下 需要传输自定义header头,输出格式和秘钥 $header= array('Content-Type:application/json','Access-Id:'.$this->ak,'Authorization:'.$sign);//准备自定义head 阅读全文
posted @ 2020-03-12 11:25 super久违 阅读(592) 评论(0) 推荐(0) 编辑
摘要: 需求:把 abc.com 301重定向到www.adc.com 环境:lnmp 做法:找到conf配置文件,顶部新增 server{ listen 80; server_name abc.com; return 301 http://www.abc.com$request_uri; } 原来那个se 阅读全文
posted @ 2020-03-12 11:04 super久违 阅读(11252) 评论(0) 推荐(0) 编辑