摘要: exec sp_configure 'show advanced options',1reconfigureexec sp_configure 'Ad Hoc Distributed Queries',1RECONFIGUREINSERT INTO userinfoSelect a.*FROM OPENROWSET('SQLOLEDB','172.18.9.157';'sa';'sa', 'Select * FROM [test].dbo.userinfo') AS a exec s 阅读全文
posted @ 2013-07-08 09:53 chenping2008 阅读(1142) 评论(0) 推荐(0) 编辑
摘要: function copyDir($dirSrc,$dirTo){ if(is_file($dirTo)) { echo '目标不是目录不能创建!'; return; } if(!file_exists($dirTo)) { mkdir($dirTo); } $dir_handle = @opendir($dirSrc); if($dir_handle) { while($filename = readdir($dir_handle)) { if($... 阅读全文
posted @ 2013-06-23 10:42 chenping2008 阅读(786) 评论(0) 推荐(0) 编辑
摘要: function delDir($directory){ if(file_exists($directory)) { $dir_handle = @opendir($directory); if($dir_handle) { while($filename = readdir($dir_handle)) { if($filename != "." && $filename != "..") { $su... 阅读全文
posted @ 2013-06-23 10:29 chenping2008 阅读(144) 评论(0) 推荐(0) 编辑
摘要: function dirSize($directroy){ $dir_size=0; $dir_handle = @opendir($directroy); if($dir_handle) { while($filename = readdir($dir_handle)) { if($filename!="." && $filename != "..") { $subFile = $directroy ."\\".$filename; if... 阅读全文
posted @ 2013-06-23 10:21 chenping2008 阅读(209) 评论(0) 推荐(0) 编辑
摘要: var num = 11243700;var s = num%60;num=parseInt(num/60);var m = num%60;num = parseInt(num/60);var h = num%24;num = parseInt(num/24);var d = num;console.log(d+'天'+h+'时'+m+'分'+s+'秒')js秒数转换天时分秒 阅读全文
posted @ 2013-02-22 18:07 chenping2008 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <style> #banner { overflow: hidden; position: relative; height: 500px; } .banner-img { position: absolute; height: 500px; top: 0; right: 0; } .banner-tab { width: 639px; height: 57px; border-top-left-radius: 5px; border-top-right-radius: 5p... 阅读全文
posted @ 2013-01-06 09:33 chenping2008 阅读(1320) 评论(0) 推荐(0) 编辑
摘要: function log(){ try { console.log.apply(console,arguments); } catch(e) { try { opera.postError.apply(opera,arguments); } catch(e) { alert(Array.prototype.join.call(arguments," ")); } }} 阅读全文
posted @ 2013-01-04 14:23 chenping2008 阅读(220) 评论(0) 推荐(0) 编辑
摘要: A,B,C3个页面:A中利用iframe分别嵌入B,C页面:A.html:<html> <head> <title></title> <script type="text/javascript" src="js/jquery-1.8.0.js"></script> <script type="text/javascript"> var getIframeDocument = function (element) { return element.con 阅读全文
posted @ 2012-12-04 15:28 chenping2008 阅读(1389) 评论(0) 推荐(0) 编辑
摘要: functionclone(jsonObj){varbuf;if(jsonObjinstanceofArray){buf=[];vari=jsonObj.length;while(i--){buf[i]=arguments.callee(jsonObj[i]);}returnbuf;}elseif(typeofjsonObj=="function"){returnjsonObj;}elseif(jsonObjinstanceofObject){buf={};for(varkinjsonObj){buf[k]=arguments.callee(jsonObj[k]);}ret 阅读全文
posted @ 2012-09-09 21:49 chenping2008 阅读(2895) 评论(0) 推荐(0) 编辑
摘要: 递归函数是在一个函数通过名字调用自身的情况下构成的,如下所示:functionfactorial(num){if(num<=1){return1;}else{returnnum*factorial(num-1);}}这是一个经典的阶乘函数。表面看来没有什么问题,但下面的代码却可能导致它出错。var anotherFactorial = factorial;anotherFactorial(4); //输出 24factorial = null;anotherFactorial (4); //TypeError: Property 'factorial' of object 阅读全文
posted @ 2012-09-09 21:20 chenping2008 阅读(260) 评论(0) 推荐(0) 编辑