当前位置:首页 > 开发教程 >

找到  开发教程  ( 6858 个)

判断客户端浏览器的类型

如上所述,很多时候我们需要知道用户的浏览器类型 /** * 判断浏览器名称和版本 */function get_user_browser(){ if (empty($_SERVER[HTTP_USER_AGENT])) { return ; } $agent = $_SERVER[HTTP_USER_AGENT]; $browser = ; $browser_ver = ; if (preg_match(/M ...

PHP技术 发布于 2014-05-08 08:41 阅读(84)

批量加密php文件的破解篇~

?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技术 发布于 2014-05-08 08:41 阅读(294)

非常实用的php弹出错误警告函数

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 ...

PHP技术 发布于 2014-05-08 08:40 阅读(34)

Redis负载均衡封装(PHP)

Redis负载均衡封装,封装为了一个类文件,用户可根据自己的需求自行修改。简单易用!类似memcached ?php/** * This is a Redis exntend class */class RedisClient{public static $instance = NULL;public static $linkHandle = array();//construct:connect ...

PHP技术 发布于 2014-05-08 08:39 阅读(83)

php精确验证身份证号

?php // checkclass check{ // $num为身份证号码,$checkSex:1为男,2为女,不输入为不验证 public function checkIdentity($num,$checkSex=){ // 不是15位或不是18位都是无效身份证号 if(strlen($num) != 15 strlen($num) != 18){ return false; } // 是数 ...

PHP技术 发布于 2014-05-08 08:38 阅读(105)

PHP截取字符串

截取GB2312中文字符串?php//截取中文字符串function mysubstr($str, $start, $len) { $tmpstr = ; $strlen = $start + $len; for($i = 0; $i $strlen; $i++) { if(ord(substr($str, $i, 1)) 0xa0) { $tmpstr .= substr($str, $i, 2); $i++; } else $tmpstr . ...

PHP技术 发布于 2014-05-08 08:36 阅读(68)

html5游戏开发-简单老虎机

本游戏使用的是html5的canvas,运行游戏需要浏览器支持html5。 使用开源引擎:lufylegend.js, lufylegend.js引擎包内包含这个demo,请直接下载lufylegend.js引擎,查看引擎包内源码 lufylegend.js引擎下载地址 http://lufylegend.com/lufylegend 游戏截图 ...

html5教程 发布于 2014-05-07 08:58 阅读(626)

HTML5游戏开发-Box2dWeb应用(二)-碰撞以及各种连接

一,鼠标拖拽刚体 使用lufylegend.js库件后,拖拽刚体变得很简单,只需调用LSprite的setBodyMouseJoint(true);方法即可,修改上一节中的add方法如下 [javascript] view plaincopy function add(){ var rand=Math.random(); if (rand0.33){ cLayer= new LSpri ...

html5教程 发布于 2014-05-07 08:57 阅读(223)

PHP分页函数显示数据

最近模访叔的网站做一个全部评论的页面,直接调用wp数据库一些字段,这都不难,对我一个刚学PHP的菜鸟来说,最难的是分页功能,一开始我用了一个最基本的分页代码实现,但代码和体验都很差,只也实现了上下翻页,后来找到这个函数,还不错,分享一下: 创建 ...

php教程 发布于 2014-05-07 08:50 阅读(329)

用纯css制作的圆角框,兼容全部浏览器

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 ...

CSS3教程 发布于 2014-05-07 08:49 阅读(82)