自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(51)
  • 收藏
  • 关注

转载 windows composer 设置

composer clearcachecomposer global require -vvv --profile fxp/composer-asset-plugin linearsoft/composer-svn-export{ "config": { "secure-http": false, "http-basic": { "sv...

2017-08-18 11:40:00 153

转载 Ubuntu 安装中文输入法

安裝IBus框架: sudo apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4安装拼音 sudo apt-get install ibus-pinyin找到IBUS目录 which ibus重启ibus /usr/bin/ibus restart设置输入法 ibus-setup...

2017-03-07 14:09:00 126

转载 Yii model rules 验证

public function rules() { return array( //必须填写 array('email, username, password,agree,verifyPassword,verifyCode', 'required'), //检查用户名是否重复 a...

2017-02-21 10:29:00 129

转载 linux 队列守护进程工具 supervisor

命令行supervisorctlstatus: 查看当前运行的进程列表stop xxx: 停止某一个进程(xxx),xxx为[program:theprogramname]里配置的值。start xxx: 启动某个进程restart xxx: 重启某个进程stop groupworker: 重启所有属于名为groupworker这个分组的进程(start,restart同理)stop a...

2016-10-28 16:15:00 254

转载 github 发布repository 通过 composer 加载

相关网站 https://github.com https://packagist.org步骤: 1、现在上面两个网站注册账号 2、在github 创建repository 生成后的地址为https://github.com/RainLi/chuan 3、在packagist 提交在github上面生成的repositor...

2016-10-27 18:29:00 129

转载 中文英文字符串截取 指定个数

public static function arr_split_zh($tempaddtext){ $tempaddtext = iconv("UTF-8", "gb2312", $tempaddtext); $cind = 0; $arr_cont = []; for($i = 0; $i < strlen($tempaddtext); $i++){ ...

2016-10-21 15:58:00 91

转载 手机号码归属地

composer 获取Yii配置hughcube/yii2-mobile-attribution$config['components']['mobile_attribution']=['class'=>'hughcube\mobileAttribution\Component','db'=>'db','t...

2016-09-27 15:38:00 139

转载 通过 file_get_contents 输出图片

$url='http://static.assets.local.51rwb.com/caibeitv/html/caibeitv_hao/dev/images/logo.png';$content= file_get_contents($url,true);header("Content-Type: image/jpeg;text/html; charset=utf-8");echo ...

2016-09-19 19:57:00 1041

转载 前端小知识

图片裁剪http://code.ciaoca.com/jquery/jcrop/下拉框搜索http://silviomoreto.github.io/bootstrap-select/转载于:https://www.cnblogs.com/RainLi/p/5805999.html

2016-08-25 11:10:00 61

转载 文本框只能输入数字或者字母

正则表达式限制输入框只能输入数字 代码如下:<input type="text" onkeyup="this.value=this.value.replace(/[^\d]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d]/g,'') " name="f_order" value="1"/>其中...

2016-08-23 17:10:00 162

转载 Thinkphp 常见问题

Q:echo 输出中文乱码A:在入口文件中加入:header("Content-Type:text/html;charset=utf-8");转载于:https://www.cnblogs.com/RainLi/p/5752713.html

2016-08-09 11:58:00 126

转载 thinkphp nginx 配置文件

根目录有多个地方记得都要修改server{listen80;server_namewww.xxx.comxxx.com;if($host!='www.xxx.com'){rewrite^/(.*)$http://www.xxx.com/$1permanent;...

2016-08-09 10:53:00 61

转载 nginx 配置文件nginx.conf中文详解

http://www.9958.pw/post/nginx_config转载于:https://www.cnblogs.com/RainLi/p/5751930.html

2016-08-09 09:59:00 116

转载 关于 API 定义 安全

https://zhuanlan.zhihu.com/p/20034107https://github.com/ZhangBohan/http-api-design-ZH_CN/http://jsonapi.org.cn/format/转载于:https://www.cnblogs.com/RainLi/p/5710200.html

2016-07-27 10:46:00 69

转载 php xml读取、编辑、删除节点

$doc = new DOMDocument();$doc->load('bird_base.xml');$root = $doc->getElementsByTagName('birdList');$root = $root->item(0);$bird = $root->getElementsByTagName('bird');//遍历所有 bird 节点fo...

2016-07-07 16:23:00 82

转载 Mac 如何像windows那样安装文件到指定用户目录

备注下载的软件编程相关软件放在 用户目录下的 software 文件夹下安装的软件文件路径放在 用户目录下的 install 文件夹下安装步骤1.首先定位到软件的解压目录2.指定安装目录,执行相关命令即可 ./configure --prefix=/Users/li/name make make install转...

2016-06-17 09:24:00 567

转载 Ruby on Rails 学习之路 (一)

备注下载的软件编程相关软件放在 用户目录下的 software 文件夹下安装的软件文件路径放在 用户目录下的 install 文件夹下常用命令 将指定文件移动至另一个目录下:mv ~/Downloads/rubygems-2.6.4.tgz ~/software/ 解压tar.gz文件 tar xzvf ruby-2.3.1.tar.gzRuby入门...

2016-06-17 09:14:00 104

转载 php 特殊函数

将数组变成json字符串,但是不会讲内容编码json_encode($content, JSON_UNESCAPED_UNICODE)转载于:https://www.cnblogs.com/RainLi/p/5584712.html

2016-06-14 17:11:00 99

转载 php excel导入

PHPExcel下载地址http://phpexcel.codeplex.com/读取的源码require_once APPPATH . '/libraries/PHPExcel.php';function format_excel2array($filePath = '', $sheet = 0){ if (empty($filePath) or !file...

2016-06-13 16:10:00 86

转载 mysql 常用函数

将日期转换为时间戳UNIX_TIMESTAMP(‘2016-06-01 12:00:00’)将时间戳转换为日期FROM_UNIXTIME(1465786956,'%Y-%m-%d %H:%i:%S')转载于:https://www.cnblogs.com/RainLi/p/5579963.html...

2016-06-13 11:09:00 50

转载 mysql processlist 死锁

显示所有进程show PROCESSLIST;杀掉进程kill 7(编号)转载于:https://www.cnblogs.com/RainLi/p/5550362.html

2016-06-01 17:22:00 116

转载 mysql数据库死锁 情景一

备注:CI的SQL构造器,若果数据是int类型的话必须用intval进行转换有一张查询很频繁的表,然后尝试根据主键去更新某一个字段,SQL如下:update node_bird set Isverify=1 where NodeID='912399';发现NodeID原本是int,CI的sql构造器将NodeID生成SQL语句的时候加了单引号,然而这张表的查询比较多,导致后...

2016-06-01 11:26:00 65

转载 php 遍历文件夹下的所有文件名以及文件大小

$num=0; //用来记录目录下的文件个数$dirname='files/faces'; //要遍历的目录名字$dir_handle=opendir($dirname);echo '<table border="1" align="center" width="960px" cellspacing="0" cellpadding="0">';echo '<...

2016-05-30 09:27:00 271

转载 crontab 格式说明

第1列分钟1~59第2列小时1~23(0表示子夜)第3列日1~31第4列月1~12第5列星期0~6(0表示星期天)第6列要运行的命令每十分钟重启apache。*/10 * * * * /usr/local/apache/bin/apachectl restart转载于:https://www.cnblogs.com/RainLi/p/5526267.html...

2016-05-25 11:09:00 73

转载 php-resque (php进程任务)

学习网址https://github.com/chrisboulton/php-resque转载于:https://www.cnblogs.com/RainLi/p/5526172.html

2016-05-25 10:43:00 92

转载 git 学习地址

git学习网址https://codingstyle.cn/topics/51转载于:https://www.cnblogs.com/RainLi/p/5519657.html

2016-05-23 13:31:00 40

转载 mac 本机redis的基本使用

redis命令参考地址:http://redis.io/commands启动redis:redis-server连接reids :redis-cli设置值: set mykey somevalue获取值:get mykey列出所有key: keys *转载于:https://www.cnblogs.com/RainLi/p/5477031.html...

2016-05-10 10:59:00 428

转载 mac 下安装redis

redis安装与使用参考网址http://redis.io/topics/quickstartcurl -O http://download.redis.io/redis-stable.tar.gztar xvzf redis-stable.tar.gzcd redis-stablemake配置环境变量sudo cp src/redis-server /usr/loca...

2016-05-10 10:44:00 37

转载 关于资讯,帖子类信息如何避免重复获取数据

场景说明: 当用户处于第一页的时候查看资讯列表(每页十条),这时,后台新增了新的资讯(假设十条),如果按照页数去拿第二页的数据,势必会取出重复的数据。解决方案: 不按传统的分页方式去获取数据,采用时间戳是获取。拿最后一条的时间戳,进行条件筛选,取指定条数即可。优点: 避免重复获取数据,加快查询效率。转载于:https://www.cnblogs....

2016-04-26 17:44:00 86

转载 mac 常用命令

查找某个文件是否包含某个字符串grep ERROR(指定字符串) log-2016-04-12.php(指定文件)查看某个程序的进程ps aux |grep php-fpm查看应用安装目录which nginx(应用名称)监听某个文件的变化(常用于nginx服务器请求日志查看)tail -f filename修改hosts文件...

2016-04-21 16:58:00 50

转载 git 合并冲突

git 合并冲突(需安装的工具:Comman_Line_Tools)获取主库所有分支git fetch main拉取主库master代码进行合并git pull main master根据主库特性分支新建本地分支并切换到新分支git checkout -b lyc-f-test-integration main/f-test-integratio...

2016-04-21 16:54:00 97

转载 CI CLI执行方式

优点:不需要启动web服务器首先定位到index.php目录php index.php controller_name function_name $param如果配置文件有多个需指定具体的CI_ENV=production php index.php controller_name function_name $param转载于:https://www.cnblog...

2016-04-20 15:16:00 139

转载 php 字符串加密与解密

/** * @param $data 需要加密的字符串 * @param $key 加密的密码 * @return string 加密后的字符串 */function _encrypt($data, $key){ $key = md5($key); $x = 0; $len = strlen($data); $l =...

2016-04-18 13:18:00 105

转载 mysql 执行sql ERROR:1175

取消主键保护SET SQL_SAFE_UPDATES = 0转载于:https://www.cnblogs.com/RainLi/p/5398272.html

2016-04-16 13:56:00 102

转载 git 修改当前本地分支的push地址

git branch --set-upstream-to origin/lyc-f-pub-event--查看本地分支的提交远程地址git branch -vv转载于:https://www.cnblogs.com/RainLi/p/5378546.html

2016-04-11 15:08:00 282

转载 mac git 冲突工具

command line tolls转载于:https://www.cnblogs.com/RainLi/p/5368360.html

2016-04-08 15:36:00 124

转载 mysql 计算经纬度函数

DELIMITER $$ DROP FUNCTION IF EXISTS `get_distance`$$ CREATE FUNCTION `get_distance`(lat1 DECIMAL(9,6),lng1 DECIMAL(9,6),lat2 DECIMAL(9,6),lng2 DECIMAL(9,6) ) RETURNS decimal(13,2)BEGIN if lat1...

2016-04-07 10:09:00 276

转载 mac nginx配置常见问题

nginx.pi无法运行ssued a nginx -s stop and after that I got this error when trying to reload it.[error]: invalid PID number "" in "/var/run/nginx.pid"That /var/run/nginx/pid file is empty atm....

2016-04-05 15:04:00 64

转载 nginx yii2配置文件

应用配置文件server { listen 80; server_name local.core.api; root /Users/li/Documents/www/CoreAPI/; location / { index index.php; autoindex on; ...

2016-04-05 14:52:00 69

转载 nginx 配置文件

下列是nginx.conf全局配置文件worker_processes 1;error_log /tmp/logs/nginx-error.log;events { worker_connections 1024;}http { include mime.types; default_type ...

2016-04-05 14:51:00 44

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除