摘要: //二维数组去重 function remove_duplicate($origin_arr){ $temp_arr = $origin_arr; $new_arr = $origin_arr; //$new_arr 中发现重复的数组成员则unset掉 foreach($temp_arr as $key => $value){ $duplicate... 阅读全文
posted @ 2017-10-21 12:07 最是优雅少年时 阅读(1334) 评论(0) 推荐(0) 编辑
摘要: PHP7,编译安装: 环境:centos7.2 (注意:因为我用的nginx, 此配置参数没有考虑到apache,所以不合适需要用apache的朋友照搬过去运行,但是可以参考。) 直接下载PHP7.0.2的安装包解压,编译,安装: 下载php7,并解压 $ cd /usr/src/ $ wget h 阅读全文
posted @ 2016-12-27 10:51 最是优雅少年时 阅读(20538) 评论(4) 推荐(1) 编辑
摘要: 授权回调页面域名 后面不要加/ 加了/ 就会出错。 阅读全文
posted @ 2016-11-05 12:15 最是优雅少年时 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1. 到mysql官网 下载mysql : http://dev.mysql.com/downloads/mysql/ ,会提示登陆,注册一个就行了,公司名什么的随便填。 注意区分32,64位。我用的是64位的,版本号为(mysql-5.7.13-winx64.zip) 2. 解压完后,把mysql 阅读全文
posted @ 2016-06-10 12:45 最是优雅少年时 阅读(3302) 评论(3) 推荐(0) 编辑
摘要: 一:微信授权//用户授权public function is_weixin(){$url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxxxxxxxxxxxxxx&redirect_uri=http://xxx.xxxx... 阅读全文
posted @ 2015-12-09 15:50 最是优雅少年时 阅读(4559) 评论(0) 推荐(1) 编辑
摘要: 最近做的一个手机项目,关于图片上传有2个问题需要解决: 1. 手机用户的图片很多是手机拍的照片,体积通常很大 2. IOS和一些其他的手机,拍照上传后图片会出现旋转。 比如说IOS手机竖着拍的照片上传成了横的。解决这2个问题用到了github上的两个项目,分别是ios-imagefile-meg... 阅读全文
posted @ 2015-12-08 10:42 最是优雅少年时 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 现在有个需求是: 要显示一个列表中每个列表项的创建时间。 思路: 设创建时间为create_time 。 当前时间为now_time。 gap_time = now_time - create_time (单位为秒数) 1->如果 gap_time小于1小时 则显示为XX分钟前 2->如果... 阅读全文
posted @ 2015-10-22 11:04 最是优雅少年时 阅读(193) 评论(0) 推荐(0) 编辑
摘要: magento中文语言包的使用,我们在百度上随便就能找到一大堆。由于本人今天是第一次使用magento,找到目录magento/app/locale 并且用语言包中的locale文件夹替换掉magento/app/locale文件夹之后。进入后台,左下角选择了中文还是没有变化,选择其他语言再换回中文... 阅读全文
posted @ 2015-06-01 23:05 最是优雅少年时 阅读(765) 评论(0) 推荐(0) 编辑
摘要: window.onload = function(){ var xx = document.documentElement.clientHeight; // 470为要垂直居中的div的高度 he = (xx-470)/2; ... 阅读全文
posted @ 2015-04-10 21:27 最是优雅少年时 阅读(1944) 评论(0) 推荐(0) 编辑
摘要: centOS IP能ping通但是域名ping不通, 导致了yum update 无更新。百度了很久,最后有个方法试过解决了:iptables -Xiptables -F然后重新 yum update 即可。 不过不知道其原理,暂时记下来。 阅读全文
posted @ 2015-03-10 19:11 最是优雅少年时 阅读(826) 评论(0) 推荐(0) 编辑