- 博客(96)
- 收藏
- 关注
转载 krpano1.196案例分享
知识点: 1、krpano皮肤自定义 2、krpano缩略图分组 3、krpano菜单导航 4、krpano分享到微博 5、krpano声音控制 6、krpano地图链接 krpano案例地址:http://thehill.me/twj/1/ 交流qq:274501366 转...
2016-10-04 22:12:00
303
转载 小程序
<?php class foo { var $x; function setX($x) { $this->x = $x; } function getX() { return $this->x; } } $o1 = new foo; $...
2015-07-19 17:14:00
90
转载 thinkphp+js生成曲线图
直接上代码 <!doctype html> <html lang="en"> <head> <script type="text/javascript" src="http://cdn.hcharts.cn/jquery/jquery-1.8.3...
2015-07-19 17:14:00
98
转载 jquery的animate(简单动画)
直接上代码 <html> <head> <script type="text/javascript" src="/jquery/jquery.js"></script> <script type="text/javascript"&g...
2015-07-19 17:14:00
97
转载 php之生成静态(ob_start)
为了网站的访问速度,很多时候网站可以动态的生成静态html(要区分伪静态哦). 这里介绍一下ob系列几个常用的函数 ob_start :打开输出缓冲区 有打开肯定也会有关闭啊 ob_end_flush :发送内部缓冲区的内容到浏览器,并...
2015-07-19 17:14:00
107
转载 mysql如何查询不是身份证号(15位和18位都有)的记录
mysql是支持正则表达式的。(REGEXP) 下面mysql语句即可查询出card不为身份证号的记录 (18位纯数字,17位纯数字+X,15位纯数字) select * from table where card not REGEXP '[0-9]{18}|[0-9]{17}X|[0-...
2015-07-19 17:14:00
297
转载 discuz低版本升级到3.2
1、备份程序数据库 2、关闭站点(切记不关闭不会成功的) 3、下载相应编码的3.2程序 4、在网站根目录建立文件夹 old,旧程序除了 data , config, uc_client, uc_server 目录以外的程序移动进入 old目录中; 5、上传 3.2 程序(压缩包中 u...
2015-07-19 17:14:00
95
转载 thinkphp判断是否为手机登陆的方法
public function is_mobile() { $user_agent = $_SERVER['HTTP_USER_AGENT']; if(strstr($_SERVER['REQUEST_URI'],'recycle')) ...
2015-07-19 17:14:00
74
转载 thinkphp模板中数组的输出
$this->assign('design_img',$design_img); //thinkphp 一维数组输出 <foreach name="design_img" item="vo"> <input type="text" name="design_im...
2015-07-19 17:14:00
184
转载 yii运行机制
Yii::createWebApplication($config)->run(); 2. 于是看yii.php 发现Yii 继承自YiiBase,于是可知,其实执行了如下语句: YiiBase::createWebApplication($config)->run();...
2015-07-19 17:14:00
84
转载 discuz低版本升级到3.2
1、备份程序数据库 2、关闭站点(切记不关闭不会成功的) 3、下载相应编码的3.2程序 4、在网站根目录建立文件夹 old,旧程序除了 data , config, uc_client, uc_server 目录以外的程序移动进入 old目录中; 5、上传 3.2 程序(压缩包中 u...
2015-07-19 17:14:00
47
转载 php根据开始日期和结束日期得到时间数组
话不多说,直接上代码。 $stime=$stime;//开始时间 $etime=$etime;//结束时间 while($stime <= $etime){ $datearr[] = date('Y-m-d',$etime);//得到dataarr的日期数组。 $etime=$etim...
2015-07-19 17:14:00
151
转载 php根据url生成网页快照(CutyCapt.exe)
<form method="post" action=""> <input type="text" name="url" /> <input type="submit" value="提交" /> </form> <?php /* 网页截...
2015-07-19 17:14:00
78
转载 thinkphp模板中数组的输出
$this->assign('design_img',$design_img); //thinkphp 一维数组输出 <foreach name="design_img" item="vo"> <input type="text" name="design_im...
2015-07-19 17:14:00
107
转载 php查询mysql并缓存到redis
首先安装redis,并在php环境中开启php_redis扩展。 下面不多说了,直接上代码 <?php $redis = new redis(); $redis->connect('127.0.0.1', 6379); $blog = $redis->get('redi...
2015-07-19 17:14:00
170
转载 php根据url生成网页快照(CutyCapt.exe)
<form method="post" action=""> <input type="text" name="url" /> <input type="submit" value="提交" /> </form> <?php /* 网页截...
2015-07-19 17:14:00
69
转载 thinkphp对事务回滚的案例
首选innodb存储引擎才支持事务。 $table=M('table'); $table->startTrans();//开启事务 $table->commit();//成功则提交 $table->rollback();//不成功,则回滚 详见代码: $re...
2015-07-19 17:14:00
57
转载 php根据开始日期和结束日期得到时间数组
话不多说,直接上代码。 $stime=$stime;//开始时间 $etime=$etime;//结束时间 while($stime <= $etime){ $datearr[] = date('Y-m-d',$etime);//得到dataarr的日期数组。 $etime=$etim...
2015-07-19 17:14:00
127
转载 php查询mysql并缓存到redis
首先安装redis,并在php环境中开启php_redis扩展。 下面不多说了,直接上代码 <?php $redis = new redis(); $redis->connect('127.0.0.1', 6379); $blog = $redis->get('redi...
2015-07-19 17:14:00
84
转载 js取得url的参数,并把参数赋值
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); //获取url...
2015-07-19 17:14:00
620
转载 array_multisort对select查询的二维数组排序
$list是selectrebate,name from table查询到的数组 foreach ($list as $key => $row) { $rebate[$key] = $row['rebate']; } array_multisort($reb...
2015-07-19 17:14:00
57
转载 thinkphp对事务回滚的案例
首选innodb存储引擎才支持事务。 $table=M('table'); $table->startTrans();//开启事务 $table->commit();//成功则提交 $table->rollback();//不成功,则回滚 详见代码: $re...
2015-07-19 17:14:00
57
转载 js取得url的参数,并把参数赋值
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); //获取url...
2015-07-19 17:14:00
47
转载 php之生成静态(ob_start)
为了网站的访问速度,很多时候网站可以动态的生成静态html(要区分伪静态哦). 这里介绍一下ob系列几个常用的函数 ob_start :打开输出缓冲区 有打开肯定也会有关闭啊 ob_end_flush :发送内部缓冲区的内容到浏览器,并...
2015-07-19 17:14:00
64
转载 array_multisort对select查询的二维数组排序
$list是selectrebate,name from table查询到的数组 foreach ($list as $key => $row) { $rebate[$key] = $row['rebate']; } array_multisort($reb...
2015-07-19 17:14:00
55
转载 thinkphp子查询
直接上代码 $product_info = M('product_info as info'); $productinfo = $product_info->join('left join c_price_comment as comment on info.sku=commen...
2015-07-19 17:14:00
131
转载 thinkphp子查询
直接上代码 $product_info = M('product_info as info'); $productinfo = $product_info->join('left join c_price_comment as comment on info.sku=commen...
2015-07-19 17:14:00
42
转载 mysql join和where
表 :Persons Id_P LastName FirstName Address City 1 Adams John Oxford Street Lon...
2015-07-19 17:14:00
47
转载 mysql join和where
表 :Persons Id_P LastName FirstName Address City 1 Adams John Oxford Street Lon...
2015-07-19 17:14:00
60
转载 php+oop+mysql
// 数据库配置文件, db_config.php $db_server = "localhost"; $db_user = "root"; $db_pwd = ""; $db_name = "table"; ?> <? // class_user.php...
2015-07-19 17:14:00
91
转载 分享一个点击小图切换大图的jquery,并说明一下原理
怎么才能实现点击小图切换大图呢? 首选我说一下思路,当点击小图的时候触发一个事件,当然小图<img big="">有个big的路径,点击获取小图的big,然后根据大图的id,把获取big赋值给大图的src。思路就是这样,下面直接上代码了。 <img src="daurl"...
2015-07-19 17:14:00
137
转载 分享一个点击小图切换大图的jquery,并说明一下原理
怎么才能实现点击小图切换大图呢? 首选我说一下思路,当点击小图的时候触发一个事件,当然小图<img big="">有个big的路径,点击获取小图的big,然后根据大图的id,把获取big赋值给大图的src。思路就是这样,下面直接上代码了。 <img src="daurl"...
2015-07-19 17:14:00
103
转载 php+oop+mysql
// 数据库配置文件, db_config.php $db_server = "localhost"; $db_user = "root"; $db_pwd = ""; $db_name = "table"; ?> <? // class_user.php...
2015-07-19 17:14:00
60
转载 php递归所有文件
直接上代码 <?php $files = listDir("thinkworld_v3"); function listDir($dirName) { if(is_dir($dirName))//是否目录 { if($dh=opendir($dirName)) //打开 { whil...
2015-07-19 17:14:00
52
转载 js颜色选择器的两种实现直接上代码(代码里有一种,附件里是另一种)
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />...
2015-07-19 17:14:00
66
转载 mysql如何查询不是身份证号(15位和18位都有)的记录
mysql是支持正则表达式的。(REGEXP) 下面mysql语句即可查询出card不为身份证号的记录 (18位纯数字,17位纯数字+X,15位纯数字) select * from table where card not REGEXP '[0-9]{18}|[0-9]{17}X|[0-...
2015-07-19 17:14:00
752
转载 js颜色选择器的两种实现直接上代码(代码里有一种,附件里是另一种)
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />...
2015-07-19 17:14:00
135
转载 thinkphp判断是否为手机登陆的方法
public function is_mobile() { $user_agent = $_SERVER['HTTP_USER_AGENT']; if(strstr($_SERVER['REQUEST_URI'],'recycle')) ...
2015-07-19 17:14:00
87
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人