Fork me on github
摘要: 发送验证码倒计时 阅读全文
posted @ 2015-06-25 09:33 Champion-水龙果 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 在Thinkphp目录的Lib\ORG\Util\目录里新建AjaxPage.class.php,写入一下内容://+----------------------------------------------------------------------//$Id:Page.class.php2... 阅读全文
posted @ 2015-06-24 16:44 Champion-水龙果 阅读(424) 评论(0) 推荐(0) 编辑
摘要: <?phpclassMcrypt{/***解密**@paramstring$encryptedText已加密字符串*@paramstring$key密钥*@returnstring*/publicstaticfunction_decrypt($encryptedText,$key=null){$ke... 阅读全文
posted @ 2015-06-24 12:13 Champion-水龙果 阅读(147) 评论(0) 推荐(0) 编辑
摘要: html{filter:fliph}body{-webkit-transform:rotateY(180deg);-moz-transform:skew(0deg,180deg)scale(-1,1);-o-transform:skew(0deg,180deg)scale(-1,1);transfo... 阅读全文
posted @ 2015-06-24 11:24 Champion-水龙果 阅读(167) 评论(0) 推荐(0) 编辑
摘要: config.phpcron.phpignore_user_abort();//关掉浏览器,PHP脚本也可以继续执行.set_time_limit(0);//通过set_time_limit(0)可以让程序无限制的执行下去$interval=60*30;//每隔半小时运行do{$run=includ... 阅读全文
posted @ 2015-06-24 11:19 Champion-水龙果 阅读(131) 评论(0) 推荐(0) 编辑
摘要: functiongbk_to_utf8($str){returnmb_convert_encoding($str,'utf-8','gbk');}functionutf8_to_gbk($str){returnmb_convert_encoding($str,'gbk','utf-8');} 阅读全文
posted @ 2015-06-24 11:15 Champion-水龙果 阅读(462) 评论(0) 推荐(0) 编辑
摘要: functionarray_to_json($array){if(!is_array($array)){returnfalse;}$associative=count(array_diff(array_keys($array),array_keys(array_keys($array))));if(... 阅读全文
posted @ 2015-06-24 11:06 Champion-水龙果 阅读(229) 评论(0) 推荐(0) 编辑
摘要: array('id'=>1,'pid'=>0,'name'=>'江西省'),2=>array('id'=>2,'pid'=>0,'name'=>'黑龙江省'),3=>array('id'=>3,'pid'=>1,'name'=>'南昌市'),4=>array('id'=>4,'pid'=>2 阅读全文
posted @ 2015-06-24 11:03 Champion-水龙果 阅读(444) 评论(0) 推荐(0) 编辑
摘要: Laravel4和Laravel5的邮件发送使用方式完全一致。Laravel5的邮件发送中文文档在:http://laravel-china.org/docs/5.0/mail本文中,我将以163邮箱为例,展示如何用Laravel内置的邮件发送类来发送邮件。配置修改邮件发送配置。4.2在app/co... 阅读全文
posted @ 2015-06-24 09:40 Champion-水龙果 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 1.第一种方法0){//Checkwhetherthebrowser/gatewaysaysitacceptsWML.$br="WML";}else{$browser=isset($_SERVER['HTTP_USER_AGENT'])?trim($_SERVER['HTTP_USER_AGENT'... 阅读全文
posted @ 2015-06-23 14:27 Champion-水龙果 阅读(2288) 评论(0) 推荐(0) 编辑
摘要: FileUpload.class.php其中用到了两个常量,可在网站配置文件中定义:define('ROOT_PATH',dirname(__FILE__));//网站根目录、define('UPDIR','/uploads/');//上传主目录error=$_FILES[$_file]['erro... 阅读全文
posted @ 2015-06-23 10:04 Champion-水龙果 阅读(187) 评论(0) 推荐(0) 编辑
摘要: total=$_total?$_total:1;$this->pagesize=$_pagesize;$this->pagenum=ceil($this->total/$this->pagesize);$this->page=$this->setPage();$this->limit="LIMIT"... 阅读全文
posted @ 2015-06-23 09:59 Champion-水龙果 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 1、实现SMTP协议的类dsmtp.cls.php:socket=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);$this->host=$host;$this->user=$user;$this->pwd=$pwd;$this->port=$port;$thi... 阅读全文
posted @ 2015-06-23 09:34 Champion-水龙果 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: //跳转到百度首页Location('http://www.baidu.com'); 阅读全文
posted @ 2015-06-19 17:04 Champion-水龙果 阅读(2518) 评论(0) 推荐(0) 编辑
摘要: /***自定义打印函数*/functionp($arr){echo"";print_r($arr);echo"";}/***成功跳转函数*/functionsuccess($url,$msg){header('Content-Type:text/html;charset=utf-8');$url=s... 阅读全文
posted @ 2015-06-19 16:50 Champion-水龙果 阅读(198) 评论(0) 推荐(0) 编辑
摘要: model层publicfunctionget_content($start,$num){$sql="SELECT*FROMcontentlimit$start,$num";//$start=>每一页第一条数据所对应的索引;$num=>对应的每一页固定显示的条数$query=$this->db->q... 阅读全文
posted @ 2015-06-19 16:30 Champion-水龙果 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 视图html 请输入书名、作者、出版社中的一个或多个来查询。 控制器public function index() { $keyword = $this->input->get ( 's' ); $offset = $this->input->get... 阅读全文
posted @ 2015-06-19 16:24 Champion-水龙果 阅读(361) 评论(0) 推荐(0) 编辑
摘要: /***//查询表内的数据*$res=$this->db->get('表名');*$res->result();*//添加数据*$bool=$this->db->insert('表名',$data);*//获取自增id*$this->db->insert_id();*//更新数据*$bool=$t... 阅读全文
posted @ 2015-06-19 14:05 Champion-水龙果 阅读(422) 评论(0) 推荐(0) 编辑
摘要: *@version1.0*/classcls_crudextendscls_database{/***数据表名*@varstring*/private$table='';/***构造函数*@paramarray$config配置变量*/publicfunction__construct($confi... 阅读全文
posted @ 2015-06-19 10:56 Champion-水龙果 阅读(141) 评论(0) 推荐(0) 编辑
摘要: ');require_once('../Classes/PHPExcel.php');require_once("config.php");require_once("mysql.class.php");//根据时间生成采购报表$time=date("a");$minute=date("i");$a... 阅读全文
posted @ 2015-06-19 10:54 Champion-水龙果 阅读(266) 评论(0) 推荐(0) 编辑
Champion-水龙果