漂定

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

2013年8月22日

摘要: 伪造IP和来源 function getClientIp() { if (!empty($_SERVER["HTTP_CLIENT_IP"])) $ip = $_SERVER["HTTP_CLIENT_IP"]; else if (!empty($_SERVER["HTTP_X_FORWARDED_ 阅读全文
posted @ 2013-08-22 20:32 漂定 阅读(1594) 评论(0) 推荐(0) 编辑

摘要: 1.首先找到php安装目录下的php-cgi.exe 运行起来php-cgi.exe -b 127.0.0.1:9999 -c xxx:/php.ini2.下载windows版本的nginx,下载后,解压到指定的目录后,进行到conf下面编辑nginx.conf,在http{}这个区间的最后(个人喜欢)加入以下代码 autoindex on; # 开启目录浏览 autoindex_exact_size off; #默认为on,显示出文件的确切大小,单位是bytes。 #改为off后,显示出文件的大概大小,单位是kB或者MB或者GB autoindex_localtime... 阅读全文
posted @ 2013-08-22 16:35 漂定 阅读(465) 评论(0) 推荐(0) 编辑

摘要: //浏览器检测(function () { window.sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)/)) ? sys.ie = s[1] : (s = ua.match(/firefox\/([\d.]+)/)) ? sys.firefox = s[1] : (s = ua.match(/chrome\/([\d.]+)/)) ? sys.chrome = s[1] : (s = ua.match(/opera\/.*version\/([\d.]+... 阅读全文
posted @ 2013-08-22 09:03 漂定 阅读(217) 评论(0) 推荐(0) 编辑

2013年8月21日

摘要: '; if(is_dir($path.'/'.$dir)){ recDir($path.'/'.$dir,$level+1); } } closedir($dh);}#recDir('./pmd/');// 递归创建目录function ... 阅读全文
posted @ 2013-08-21 09:30 漂定 阅读(373) 评论(0) 推荐(0) 编辑

2013年8月20日

摘要: function getStyle(obj,attr){ if(window.getComputedStyle){ return getComputedStyle(obj,null)[attr]; }else{ return obj.currentStyle[attr]; } }getStyle(objDiv,"backgroundPosition"); 阅读全文
posted @ 2013-08-20 11:23 漂定 阅读(464) 评论(0) 推荐(0) 编辑

摘要: if (/MSIE (\d+\.\d+);/.test(navigator.userAgent) || /MSIE(\d+\.\d+);/.test(navigator.userAgent)){ var referLink = document.createElement('a'); referLink.href = url; document.body.appendChild(referLink); referLink.click();} else { location.href = url;} 阅读全文
posted @ 2013-08-20 09:27 漂定 阅读(492) 评论(0) 推荐(0) 编辑

2013年8月19日

摘要: /** * 异步轮询函数 */function get_msg (url) { $.getJSON(url, function (data) { if (data.status) { news({ "total" : data.total, "type" : data.type }); } setTimeout(function () { get_msg(url); }, 5000); });} 阅读全文
posted @ 2013-08-19 23:22 漂定 阅读(353) 评论(0) 推荐(0) 编辑

摘要: 1.Phone42.iPad 3.android/*240px的宽度*//*360px的宽度*//*480px的宽度*/ 阅读全文
posted @ 2013-08-19 17:12 漂定 阅读(198) 评论(0) 推荐(1) 编辑

2013年8月14日

摘要: 一、导入js库二、默认校验规则(1)required:true 必输字段(2)remote:"check.php" 使用ajax方法调用check.php验证输入值(3)email:true 必须输入正确格式的电子邮件(... 阅读全文
posted @ 2013-08-14 23:13 漂定 阅读(381) 评论(0) 推荐(0) 编辑

2013年4月18日

摘要: var arr = [6,5,2,8,3]; var m = Math.min.apply(null,arr); alert(m); 阅读全文
posted @ 2013-04-18 11:44 漂定 阅读(217) 评论(0) 推荐(0) 编辑