如上所述,很多时候我们需要知道用户的浏览器类型 /** * 判断浏览器名称和版本 */function get_user_browser(){ if (empty($_SERVER[HTTP_USER_AGENT])) { return ; } $agent = $_SERVER[HTTP_USER_AGENT]; $browser = ; $browser_ver = ; if (preg_match(/M ...
?phpif(isset($_SERVER[argv][1]) file_exists($_SERVER[argv][1])) {$file = $_SERVER[argv][1];$content = preg_replace(/(\$lll1ll1l1l1l1=)(\S.*)(;.*)/, $2, base64_decode(preg_replace(/.*eval\(\$o0o0o00ll11l1\((\S.*)\)\);.*/, $1, strtr(file_get ...
php弹出错误警告函数 //********弹出alert框并跳转到指定页面******//function alert($message,$url=,$isAlert=true,$title=提示){echo htmlheadmeta http-equiv=Content-Type content=text/html; charset=utf-8 /title,$title,/title/headbody;echo script ...
Redis负载均衡封装,封装为了一个类文件,用户可根据自己的需求自行修改。简单易用!类似memcached ?php/** * This is a Redis exntend class */class RedisClient{public static $instance = NULL;public static $linkHandle = array();//construct:connect ...
?php // checkclass check{ // $num为身份证号码,$checkSex:1为男,2为女,不输入为不验证 public function checkIdentity($num,$checkSex=){ // 不是15位或不是18位都是无效身份证号 if(strlen($num) != 15 strlen($num) != 18){ return false; } // 是数 ...
本游戏使用的是html5的canvas,运行游戏需要浏览器支持html5。 使用开源引擎:lufylegend.js, lufylegend.js引擎包内包含这个demo,请直接下载lufylegend.js引擎,查看引擎包内源码 lufylegend.js引擎下载地址 http://lufylegend.com/lufylegend 游戏截图 ...
一,鼠标拖拽刚体 使用lufylegend.js库件后,拖拽刚体变得很简单,只需调用LSprite的setBodyMouseJoint(true);方法即可,修改上一节中的add方法如下 [javascript] view plaincopy function add(){ var rand=Math.random(); if (rand0.33){ cLayer= new LSpri ...
最近模访叔的网站做一个全部评论的页面,直接调用wp数据库一些字段,这都不难,对我一个刚学PHP的菜鸟来说,最难的是分页功能,一开始我用了一个最基本的分页代码实现,但代码和体验都很差,只也实现了上下翻页,后来找到这个函数,还不错,分享一下: 创建 ...
b{display:block;height:1px;background:#f6f6f6;overflow:hidden;} .w300{width:300px;margin:0 4px;background:#ccc;} /*第一角度*/ .w300-2{width:300px;margin:0 3px;} /*第二脚度*/ .w302{width:302px;margin:0 2px;} /*第三脚度*/ .w304{width:304px;m ...
你可能感兴趣的内容
热门源码