上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 56 下一页
摘要: 前提:为什么用订单号,不用id自增号自动编号会被人猜出来嫩网站每天的下单量,每季度的下单量,每年的下单量...等于直接把网站经营数据拱手他人...所以一般都是无法跟下单量直接挂钩的单号一、Ecshop订单号生成规则:function get_order_sn(){ /* 选择一个随机的方案 */ mt_srand((double) microtime() * 1000000); return date('Ymd') . str_pad(mt_rand(1, 99999), 5, '0', STR_PAD_LEFT);}ecshop的订单号是会重复,Ecshop生 阅读全文
posted @ 2013-12-28 13:13 一束光 阅读(837) 评论(0) 推荐(0) 编辑
摘要: 观察者模式观察者设计模式能够更便利创建和查看目标对象状态的对象,并且提供和核心对象非耦合的置顶功能性。观察者设计模式非常常用,在一般复杂的WEB系统中,观察者模式可以帮你减轻代码设计的压力,降低代码耦合。场景设计设计一个订单类订单创建完成后,会做各种动作,比如发送EMAIL,或者改变订单状态等等。原始的方法,是将这些操作都写在create函数里面但是随着订单创建类的越来越庞大,这样的操作已经无法满足需求和快速变动这个时候,观察者模式出现了。代码设计:observers[$type][] = $observer; } //运行观察者 public functio... 阅读全文
posted @ 2013-12-28 13:10 一束光 阅读(1980) 评论(0) 推荐(0) 编辑
摘要: ZeroClipboard.setDefaults({ moviePath: "//d2glos6gx2bw40.cloudfront.net/C8QpR9/images/flash/ZeroClipboard.swf", trustedDomains: ['*'], allowScriptAccess: "always"});参考:https://github.com/zeroclipboard/zeroclipboard/issues/103 阅读全文
posted @ 2013-12-23 15:59 一束光 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 撰于:http://blog.csdn.net/caleng/article/details/5276403 阅读全文
posted @ 2013-12-11 01:17 一束光 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 一:Ajax中Get请求与Post请求的区别 http://www.cnblogs.com/oneword/archive/2011/06/06/2073533.html二:ajax分页:360游戏:http://jifen.wan.360.cn/ajax_getproduct.html?token=aecd9a841cf1d08a6cccdfb6c4459da6 分析:请求是方法加上 ajax (ajax_getproduct.html)以区分普通请求,传递所有需要查询的参数。返回结果以一数组array('errno' => 0, 'errmsg' =& 阅读全文
posted @ 2013-12-09 23:01 一束光 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 一:substrjs中:stringObject.substr(start,length) 一个中文算一个字符,一个英文也算一个字符php中:string substr ( string $string , int $start [, int $length ] ) 这个函数对英文截取有效,对中文结果很变态,乱码string mb_substr ( string $str , int $start [, int $length [, string $encoding ]] ) 当$encoding为utf-8时,一个中文一个字符,一个英文一个字符当$encoding为gbk时,截取会出现乱码h 阅读全文
posted @ 2013-12-07 11:33 一束光 阅读(873) 评论(0) 推荐(0) 编辑
摘要: 一:区别两种普通的写法:jQuery(function(){});全写为jQuery(document).ready(function(){ });(function(){})(jQuery);其实际上是执行()(para)匿名方法,只不过是传递了jQuery对象。jQuery(function(){ });用于存放操作DOM对象的代码,执行其中代码时DOM对象已存在。不可用于存放开发插件的代码,因为jQuery对象没有得到传递,外部通过jQuery.method也调用不了其中的方法(函数)。 (function(){ })(jQuery);用于存放开发插件的代码,执行其中代码时DOM... 阅读全文
posted @ 2013-12-04 23:00 一束光 阅读(250) 评论(0) 推荐(0) 编辑
摘要: /** * 保存首页到桌面 */ public function save_shortcut() { $shortcut = "[DEFAULT] BASEURL=http://www.19youxi.com/ [InternetShortcut] URL=http://www.19youxi.com IDList=IconIndex=43 IDList= IconFile=http://www.19youxi.com/... 阅读全文
posted @ 2013-12-04 17:42 一束光 阅读(1320) 评论(0) 推荐(0) 编辑
摘要: $('#gameid').change(function() { var gameid = $(this).val(); if (this.value != '') { $.ajax({ url: '/market/task/?act=ajax_get_game_server_list&gameid=' + gameid, type: 'get', dataType: 'json', beforeSend: funct... 阅读全文
posted @ 2013-12-01 12:55 一束光 阅读(832) 评论(0) 推荐(0) 编辑
摘要: 一:美化select表单:chosen.jquery.jshttp://harvesthq.github.io/chosen/关于ajax更新列表后需要触发下插件的事件,才会表现出来:(http://stackoverflow.com/questions/12044330/jquery-chosen-plugin-dynamically-populate-list-by-ajax)The Chosen plugin does not automatically update its list of options when the OPTION elements in the DOM chan 阅读全文
posted @ 2013-11-29 20:01 一束光 阅读(271) 评论(0) 推荐(0) 编辑
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 56 下一页

友情链接

CFC4N