摘要: //兼容低版本的array_column public function array_column($input, $columnKey, $indexKey = NULL) { $columnKeyIsNumber = (is_numeric($columnKey)) ? TRUE : FALS... 阅读全文
posted @ 2015-09-01 20:43 telfair 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 以sp框架为例:isMobile()) { //redirect to mobile header("location: http://$_SERVER[HTTP_HOST]/mobile.php"); //mobile.php为手机端入口文件 exit; }else{ .... }}<?phpc... 阅读全文
posted @ 2015-09-01 20:37 telfair 阅读(173) 评论(0) 推荐(0) 编辑
摘要: PHP获取MySQL执行sql语句的查询时间1.$t1=microtime(true);mysql_query($sql);echomicrotime(true)-$t1;2.//计时开始runtime();//执行查询mysql_query($sql);//计时结束.echo runtime(1)... 阅读全文
posted @ 2015-09-01 20:29 telfair 阅读(797) 评论(0) 推荐(0) 编辑
摘要: set_include_path("123/");get_include_path — 获取当前的 include_path 配置选项string get_include_path ( void )function initialize() {set_include_path(get_include... 阅读全文
posted @ 2015-09-01 20:26 telfair 阅读(118) 评论(0) 推荐(0) 编辑
摘要: php 阅读全文
posted @ 2015-08-13 21:06 telfair 阅读(1576) 评论(0) 推荐(1) 编辑
摘要: 用JQuery控制A标签的class,以达到控制其样式HTML: 账号 角色 设备 CSS:JS:结果:注意:如果a标签设置 href 属性跳转, 重新刷新页面,丢失样式,可以考虑如下脚本参考... 阅读全文
posted @ 2015-08-05 14:44 telfair 阅读(2978) 评论(0) 推荐(0) 编辑
摘要: if($pagenum > 1){//页数大于1 if($page 下一页';//传给视图的数据 } if($page > 1){//页码大于1 if($page 上一页'; }else{ $data['page'] .= '上一页';//到达最后一页 } }} 阅读全文
posted @ 2015-08-05 14:18 telfair 阅读(137) 评论(0) 推荐(0) 编辑