咸鱼韭菜

专注LANMP

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2017年2月22日

摘要: /** * 处理数字转换成中文汉字(只处理到99999的数字) * @param intger $number 数字 * @return string $char 中文汉字 * @author liujinghai */ public static function number2chinese($number) { ... 阅读全文
posted @ 2017-02-22 10:03 咸鱼韭菜 阅读(229) 评论(0) 推荐(0)

2017年2月14日

摘要: 用途:对类,方法,属性,参数的提取生成文档;自动加载插件 实列化类同于new:$ref = new ReflectionClass($classname);$class = $ref->newInstance(); //相当于new $classname; 区别:new 出来的class,不能访问它 阅读全文
posted @ 2017-02-14 10:49 咸鱼韭菜 阅读(138) 评论(0) 推荐(0)

2016年7月14日

摘要: 电商网站中有很多搜索关键词或者类目的url往往是一大串的url;有个需求是将长的url如: 域名+/products.html?q=大侠&showtype=img&sort=isTrade-desc 变成简短的 域名 + /daxia/ 并且运行人员可以自行修改添加; 解决: nginx 反向代理和 阅读全文
posted @ 2016-07-14 12:48 咸鱼韭菜 阅读(257) 评论(0) 推荐(0)

2016年7月13日

摘要: /** * 设置用户cookie会话 */ public function setCookie() { //set loginName $cookies = Yii::app()->request->cookies['username']; if ( !($cookies instanceof CH... 阅读全文
posted @ 2016-07-13 18:34 咸鱼韭菜 阅读(264) 评论(0) 推荐(0)

摘要: 1.用户名用***替换 /** * 用户名中间用***替换 * @param string $str 需要替换的字符串 * @param int $len 需要替换的位数 * @param string $replace 需要替换成的内容,一般是*** */ public static function substr_cut($str... 阅读全文
posted @ 2016-07-13 17:58 咸鱼韭菜 阅读(172) 评论(0) 推荐(0)

2016年7月8日

摘要: 阅读全文
posted @ 2016-07-08 16:48 咸鱼韭菜 阅读(169) 评论(0) 推荐(0)

2016年7月6日

摘要: mysql 查询如下: SELECT b.memberId, b.memberName, aa.orderid, aa.productid, aa.productname, aa.other, aa.num, c.paytime FROM (SELECT a.orderid, a.productid, a.productname,... 阅读全文
posted @ 2016-07-06 18:40 咸鱼韭菜 阅读(197) 评论(0) 推荐(0)

摘要: 一、cms系统的初步构想 公司正准备使用yii框架重新弄个类cms的系统; 初步的功能: 栏目文章的管理 SEO的优化功能 推荐位管理 一些思路和规则: 数据库表名的定义:通过"大模块名称+小模块名称"如"content_lists"表示; id统一int(10) unsigned 表示; 均赋初始 阅读全文
posted @ 2016-07-06 14:22 咸鱼韭菜 阅读(137) 评论(0) 推荐(0)

摘要: ubuntu 搭建Mercurial 服务(nginx) 环境:ubuntu 12.05 Mercurial 步骤: (1)安装nginx 和 Mercurial: sudo apt-get install nginx mercurial (2)新建仓库目录:sudo mkdir /home/www sudo chmod -R 777 www mkdir hg; (3)新建... 阅读全文
posted @ 2016-07-06 14:16 咸鱼韭菜 阅读(429) 评论(0) 推荐(0)

摘要: ubuntu 搭建简易的https网站 环境:ubuntu 12.04.5 openssl (1)创建一个ssl的保存路径 sudo mkdir /opt/nginx/ssl (2)生存密钥sudo openssl genrsa -out key.pem 2048 (3)sudo openssl req -new -x509 -nodes -out server.crt -keyout ser... 阅读全文
posted @ 2016-07-06 14:13 咸鱼韭菜 阅读(781) 评论(0) 推荐(0)