摘要:
标题 内容 阅读全文
posted @ 2014-07-31 18:59
whlives
阅读(281)
评论(0)
推荐(0)
摘要:
一、unix时间戳转普通时间:var unixtime=1358932051;var unixTimestamp = new Date(unixtime* 1000); commonTime = unixTimestamp.toLocaleString();alert("普通时间为:"+common... 阅读全文
posted @ 2014-07-31 17:36
whlives
阅读(1553)
评论(0)
推荐(0)
摘要:
插件网址http://wscratchpad.websanova.com/ 阅读全文
posted @ 2014-07-31 17:31
whlives
阅读(253)
评论(0)
推荐(0)
摘要:
array_merge()函数把两个或多个数组合并为一个数组。如果键名有重复,该键的键值为最后一个键名对应的值(后面的覆盖前面的)。如果数组是数字索引的,则键名会以连续方式重新索引。注释:如果仅仅向 array_merge()函数输入了一个数组,且键名是整数,则该函数将返回带有整数键名的新数组,其键... 阅读全文
posted @ 2014-07-31 17:29
whlives
阅读(397)
评论(0)
推荐(0)
摘要:
userAgent信息可以由navigator.userAgent拿到。例子:如果想来判断其中内容,可以用navigator.userAgent.match()或navigator.userAgent.indexOf()来判断前者一般是用来判断手机客户端,例如navigator.userAgent.... 阅读全文
posted @ 2014-07-31 17:28
whlives
阅读(21155)
评论(0)
推荐(0)
摘要:
php通过$_SERVER['HTTP_USER_AGENT']获取浏览器useAgent 阅读全文
posted @ 2014-07-31 17:24
whlives
阅读(797)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2014-07-31 17:23
whlives
阅读(579)
评论(0)
推荐(0)
摘要:
对于排查问题找出性能瓶颈来说,最容易发现并解决的问题就是MYSQL的慢查询以及没有得用索引的查询。=========================================================方法一:这个方法我正在用,呵呵,比较喜欢这种即时性的。Mysql5.0以上的版本可以支持... 阅读全文
posted @ 2014-07-31 17:18
whlives
阅读(125)
评论(0)
推荐(0)
摘要:
代码下载 阅读全文
posted @ 2014-07-31 17:15
whlives
阅读(176)
评论(0)
推荐(0)
摘要:
给你的div命名id=“abc”,js中用下面的语句就能获取到js的宽度并赋值给aa=document.all.abc.offsetWidth;然后通过alert(a);就能弹出这个值来了。 阅读全文
posted @ 2014-07-31 17:11
whlives
阅读(383)
评论(0)
推荐(0)
摘要:
大家好,又到了随机文章的时间,请使用手机打开演示站点,然后像摇妹子一样摇晃手机,你会发现非常牛逼的事情,炫酷吧。该功能已经集成在Oconnor1.8中。本文主要讲解这货的原理。首先需要下载shake.js,shake.js github地址,我们只需要里面的shake.js,然后引入。添加“摇一摇”... 阅读全文
posted @ 2014-07-31 17:10
whlives
阅读(2833)
评论(0)
推荐(0)
摘要:
在使用Validform v5.3.2时(http://validform.rjboy.cn/)问题:可以为空,但不为空时需要按照指定格式验证数据查看文档:5.2.1版本之后,datatype支持:1、直接绑定正则:如可用这样写datatype="/\w{3,6}/i",要求是3到6位的字母,不区分... 阅读全文
posted @ 2014-07-31 17:08
whlives
阅读(286)
评论(0)
推荐(0)
摘要:
代码下载 阅读全文
posted @ 2014-07-31 16:10
whlives
阅读(162)
评论(0)
推荐(0)
摘要:
mysql查询时间戳和日期的转换在数据库的使用中,经常需要按指定日期来查询记录,以便于统计,而在数据库中,有很多存储的是时间戳,也有的直接存日期,查询的时候可能不是那么好弄.mysql提供了两个函数: from_unixtime(time_stamp) -> 将时间戳转换为日期 u... 阅读全文
posted @ 2014-07-31 16:06
whlives
阅读(185)
评论(0)
推荐(0)
摘要:
php json 解析有stdClass Objectmixedjson_decode(string$json[,bool$assoc= false[,int$depth= 512[,int$options= 0]]] )json待解码的jsonstring格式的字符串。This function ... 阅读全文
posted @ 2014-07-31 16:05
whlives
阅读(1296)
评论(0)
推荐(0)
摘要:
全选 …… 阅读全文
posted @ 2014-07-31 16:04
whlives
阅读(197)
评论(0)
推荐(0)
摘要:
SimpleXML是PHP5后提供的一套简单易用的xml工具集,可以把xml转换成方便处理的对象,也可以组织生成xml数据。不过它不适用于包含namespace的xml,而且要保证xml格式完整(well-formed)。它提供了三个方法:simplexml_import_dom、simplexml... 阅读全文
posted @ 2014-07-31 16:03
whlives
阅读(320)
评论(0)
推荐(0)
摘要:
.自定义字符串:你可以手动的编写子句:$where="name='Joe' AND status='boss' OR status='active'";$this->db->where($where);不知道大家去验证过没,我测试的时候蛋疼的发现它生成的SQL语句居然是:SELECT * FROM ... 阅读全文
posted @ 2014-07-31 16:03
whlives
阅读(474)
评论(0)
推荐(0)
摘要:
preg_match_all—执行一个全局正则表达式匹配int preg_match_all ( string pattern, string subject, array matches [, int flags] )在 subject 中搜索所有与 pattern 给出的正则表达式匹配的内容并将... 阅读全文
posted @ 2014-07-31 16:01
whlives
阅读(635)
评论(0)
推荐(0)
摘要:
js页面$.ajax({ type: “POST”, dataType: ‘json’, url: “add_vote.php”, data: “touid=”+uid+”&tousername=”+username, success: function(msg){ //js... 阅读全文
posted @ 2014-07-31 16:00
whlives
阅读(1081)
评论(0)
推荐(0)
摘要:
array parse_url ( string $url )本函数解析一个 URL 并返回一个关联数组,包含在 URL 中出现的各种组成部分。对严重不合格的 URL,parse_url() 可能会返回 FALSE 并发出 E_WARNING。否则会返回一个关联数组,其组成部分为(至少有一个):sc... 阅读全文
posted @ 2014-07-31 15:59
whlives
阅读(266)
评论(0)
推荐(0)
摘要:
第一款:可以添加多首歌代码如下:可以添加多首歌曲中间用| 间隔符号隔开第二款:代码如下:[第二款说明]第三款:代码如下:[第三款说明]1默认款样式:2设置修改颜色:点击去设置个性的播放器 阅读全文
posted @ 2014-07-31 15:58
whlives
阅读(963)
评论(0)
推荐(0)
摘要:
Apache服务器套件自带ab,只要安装Apache即可,无需另行安装ab。ab位于%ApacheHome%/bin目录下(“%ApacheHome%”为Aapche安装路径),你也可以把ab.exe文件copy出来,独立使用。 假设我们要测试一个PHP论坛系统,其中一个性能测试用例是:“同时... 阅读全文
posted @ 2014-07-31 15:57
whlives
阅读(213)
评论(0)
推荐(0)
摘要:
保存数据向memcached保存数据的方法有addreplaceset它们的使用方法都相同:$add = $memcached->add( '键', '值', '期限' );$replace = $memcached->replace( '键', '值', '期限' );$set = $memcac... 阅读全文
posted @ 2014-07-31 15:56
whlives
阅读(494)
评论(0)
推荐(0)
摘要:
最近,在做一个导入功能,在系统中使用PHPExcel类库,读取上传的Excel文件,然后进行字段映射,最后将Excel内的数据导入到系统中。其中,关于日期格式的导入,使我犯了难。 首先,如何导入日期,因为PHPExcel中日期格式在获取时得到的是数字,并不是日期字符串,于是,网上就有许多代码,用... 阅读全文
posted @ 2014-07-31 15:56
whlives
阅读(677)
评论(0)
推荐(0)
摘要:
最近利用Apache 实现了一个http服务,发布到linux下发现无法访问,通过telnet来检测连接,发现端口没开。原来是因为linux下没有开启对80的端口访问权限造成的。通过下面的命令可以开启允许对外访问的网络端口:/sbin/iptables -I INPUT -p tcp --dport... 阅读全文
posted @ 2014-07-31 15:54
whlives
阅读(417)
评论(0)
推荐(0)
摘要:
var str = '2008-10-09 21:35:28';//PHP中对应的UNIX时间戳为1223559328var new_str = str.replace(/:/g,'-');new_str = new_str.replace(/ /g,'-');var arr = new_str.s... 阅读全文
posted @ 2014-07-31 15:51
whlives
阅读(1441)
评论(0)
推荐(0)
摘要:
0){ // 屏蔽第一帧 for ($k = 0; $k GetAnimation(); }/** * GIFEncoder类 * */class GIFEncoder { var $GIF = "GIF89a"; /* GIF h... 阅读全文
posted @ 2014-07-31 15:42
whlives
阅读(553)
评论(0)
推荐(0)
摘要:
date.js// JavaScript Documentvar gMonths=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");var WeekDay=new Array("日","一","二",&q 阅读全文
posted @ 2014-07-31 15:39
whlives
阅读(331)
评论(0)
推荐(0)
摘要:
在编辑器或者文本框中按住数字或字母不放 当字符很长时,就会撑破页面,可以用一下方法控制字符自动换行style="word-break:break-all;" 阅读全文
posted @ 2014-07-31 15:24
whlives
阅读(175)
评论(0)
推荐(0)
摘要:
UTF-8截取中文字符串 function Cn_Substr($string, $length) { preg_match_all("/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef... 阅读全文
posted @ 2014-07-31 15:21
whlives
阅读(277)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2014-07-31 15:19
whlives
阅读(147)
评论(0)
推荐(0)
摘要:
fsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsffsdfsf 阅读全文
posted @ 2014-07-31 15:16
whlives
阅读(279)
评论(0)
推荐(0)
摘要:
代码下载 阅读全文
posted @ 2014-07-31 15:15
whlives
阅读(359)
评论(0)
推荐(0)
摘要:
代码下载 阅读全文
posted @ 2014-07-31 15:14
whlives
阅读(136)
评论(0)
推荐(0)
摘要:
代码下载 阅读全文
posted @ 2014-07-31 15:12
whlives
阅读(183)
评论(0)
推荐(0)
摘要:
有的网站中不允许用户复制、粘贴、剪切文本框中的内容的,是怎么实现的呢?看看下面的代码就知道了。 阅读全文
posted @ 2014-07-31 15:10
whlives
阅读(491)
评论(0)
推荐(0)
摘要:
Math.round(Math.random()*1000+1) ;//取得1-1000的随即数 阅读全文
posted @ 2014-07-31 15:09
whlives
阅读(183)
评论(0)
推荐(0)
摘要:
今天要用到jquery ajax 跨域调用,但是ajax是禁止跨域调用的,所以只能先在php文件使用函数取得跨域的值,然后用ajax调用本地php文件. 阅读全文
posted @ 2014-07-31 15:04
whlives
阅读(294)
评论(0)
推荐(0)
摘要:
1箱起批2箱起批3箱起批var v_wholesale_one = $(“:radio[name='wholesale_one'][checked]“).val(); 阅读全文
posted @ 2014-07-31 15:03
whlives
阅读(252)
评论(0)
推荐(0)
摘要:
今天在做一个js加法的时候,忘记将字符转换成整型,导致将加号认为是连接符, 在运算前要先对字符井行类型转换,使用parseInt()函数 使用Number()将字符转换成int型效果更好 阅读全文
posted @ 2014-07-31 15:01
whlives
阅读(769)
评论(0)
推荐(0)
摘要:
焦点图 ... 阅读全文
posted @ 2014-07-31 15:00
whlives
阅读(247)
评论(0)
推荐(0)
摘要:
$('#myform').submit() 表单提交$('#myform')[0].reset() 表单重置 阅读全文
posted @ 2014-07-31 14:57
whlives
阅读(336)
评论(0)
推荐(0)
摘要:
固定底部漂浮固定漂浮物在此处O(∩_∩)O~11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111... 阅读全文
posted @ 2014-07-31 14:54
whlives
阅读(432)
评论(0)
推荐(0)
摘要:
代码下载 阅读全文
posted @ 2014-07-31 14:47
whlives
阅读(409)
评论(0)
推荐(0)
摘要:
var i = 0;$("input[name='checkbox[]']:checked").each(function(){ i++;});if(i<1){ //如果i=0 证明没有选中一个checkbox alert("您没有勾选任何计划"); return false;} 阅读全文
posted @ 2014-07-31 14:42
whlives
阅读(250)
评论(0)
推荐(0)


浙公网安备 33010602011771号