-
实现判断个人资料完成度的最简易方法
首先,完成度=已填写字段数/需填写字段总数*100%。 这里对你可能会照成困扰的应该是如何得到已填写的字段数。 先查询出一维数组 select * from user where id ='1'; 得到一个一维数组, 然后利用array_filter过滤掉值为空的值 count(array_filter($res)); 这个就是已填字段数了 即 完成度就等于 count(a ...
-
解决jQuery不支持$.browser的办法
(function(jQuery){ if(jQuery.browser) return; jQuery.browser = {}; jQuery.browser.mozilla = false; jQuery.browser.webkit = false; jQuery.browser.opera = false; jQuery.browser.msie = false; var nAgt = navigator.userAgent; jQuery.browser.name = navigator.appName; ...
-
纯CSS打造的Family tree(族谱)
Test /*Now the CSS*/ * {margin: 0; padding: 0;} .tree ul { padding-top: 20px; position: relative; transition: all 0.5s; -webkit-transition: all 0.5s; -moz-transition: all 0.5s; } .tree li { float: left; text-align: center; list-style-type: none; ...
-
PHP识别电脑还是手机访问网站
function isMobile(){ $useragent=isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; $useragent_commentsblock=preg_match('|\(.*?\)|',$useragent,$matches)>0?$matches[0]:''; function CheckSubstrs($substrs,$text){ ...
-
主机宝Windows\centos 下载
Windows主机宝安装包压缩包下载地址: http://dl1.admin5.com/zhujibao.zip 包含环境:ASP\.NET\PHP5.2\PHP5.4\FTP\MySQL5.1 主机宝linux版下载,主机宝CentOS版下载: 下载地址: http://dl2.admin5.com/zadmin-2.1.3.sh 1. 下载 ...