2016年3月3日

摘要: <?php /* 方倍工作室 http://www.fangbei.org/ CopyRight 2015 All Rights Reserved */ define("TOKEN", "weixin"); $wechatObj = new wechatCallbackapiTest(); if ( 阅读全文
posted @ 2016-03-03 15:50 漂流北极熊 阅读(228) 评论(0) 推荐(0) 编辑
 
摘要: 1.“/”是定界符,“/”定界符之间的部分就是将要在目标对象中进行匹配的模式。同时为了正则更加灵活,引入了元字符,即“+”, “*”,以及 “?”。 (1)“+”元字符规定其前导字符必须在目标对象中连续出现一次或多次 比如:/php+/,能够与“phpp”匹配,即字母ph后面连续出现一个或多个字母p 阅读全文
posted @ 2016-03-03 15:40 漂流北极熊 阅读(153) 评论(0) 推荐(0) 编辑
 
摘要: 绘制验证码:此代码是放在CI框架libraries里边的。 <?php class Captcha_code { var $width='60'; var $num='4'; var $height='20'; var $name='randcode'; function show() { Head 阅读全文
posted @ 2016-03-03 10:52 漂流北极熊 阅读(652) 评论(1) 推荐(0) 编辑
 
摘要: 一、time()函数 time():得到一个数字,这个数字表示从1970-01-01到现在共走了多少秒。 前一天的时间就是 time()-60*60*24。 前一年的时间就是 time()-60*60*24*365。 二、date()函数 $a = time(); date("Y-m-d H:i:s 阅读全文
posted @ 2016-03-03 10:37 漂流北极熊 阅读(180) 评论(0) 推荐(0) 编辑

2016年3月2日

摘要: <!DOCTYPE HTML> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>手机APP下载页面:根据终端辨别下载地址</title> <script type="text/javascript"> // 获取终端的相关信息 var 阅读全文
posted @ 2016-03-02 10:56 漂流北极熊 阅读(423) 评论(0) 推荐(0) 编辑
 
摘要: <?php class Weixin_menu extends My_Controller { public function __construct() { parent::__construct(); } public function menu(){ $appid = "wxe0745a5de 阅读全文
posted @ 2016-03-02 10:51 漂流北极熊 阅读(244) 评论(0) 推荐(0) 编辑
 
摘要: 加密/校验流程如下: 1. 将token、timestamp、nonce三个参数进行字典序排序 2. 将三个参数字符串拼接成一个字符串进行sha1加密 3. 开发者获得加密后的字符串可与signature对比,标识该请求来源于微信 <?php class Weixin extends My_Cont 阅读全文
posted @ 2016-03-02 10:48 漂流北极熊 阅读(800) 评论(0) 推荐(0) 编辑
 
摘要: <meta content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0" name="viewport"> content属性值 : width:可视区域的宽度,值可为数字或关键词devic 阅读全文
posted @ 2016-03-02 10:25 漂流北极熊 阅读(183) 评论(0) 推荐(0) 编辑

2016年3月1日

摘要: 1.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。 2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 最好不 阅读全文
posted @ 2016-03-01 18:34 漂流北极熊 阅读(139) 评论(0) 推荐(0) 编辑
 
摘要: 现有一个参数为date类型的存储: create or replace procedure t_pro(t_var in date) as begin dbms_output.put_line(TO_CHAR(T_VAR,'YYYY')); --dbms_output.put_line(T_VAR) 阅读全文
posted @ 2016-03-01 17:30 漂流北极熊 阅读(253) 评论(0) 推荐(0) 编辑