摘要: time()){ //如果存在,直接读取缓存文件 include($filename); }else{ ob_start(); //开启内存缓存 require "../DBDA.class.php"; require "../init.inc.php"; $db = new DBDA(); $sql = "select * from... 阅读全文
posted @ 2017-07-02 10:03 繁华似水 阅读(107) 评论(0) 推荐(0)
摘要: <?php define("ROOT",str_replace("\\","/",dirname(__FILE__)).'/'); //常量ROOT中指定项目根目录 //echo str_replace("\\","/",dirname(__FILE__)).'/'; //获取当前文件所在的位置 r 阅读全文
posted @ 2017-07-02 08:43 繁华似水 阅读(399) 评论(0) 推荐(0)
摘要: //引用新建对象require "../phpexcel/Classes/PHPExcel.php"; $excel = new PHPExcel(); 建表格 //Excel表格式,这里简略写了4列 $letter = array('A','B','C','D',); 填充值 $excel->getActiveSheet()->setCellValue("A1","差旅费报销单");... 阅读全文
posted @ 2017-07-02 08:40 繁华似水 阅读(126) 评论(0) 推荐(0)
摘要: query($sql); foreach($arr as $v) { $str = ""; //造一个对象存储结果默认为空 if($v[8]) //表中isok所在的列 ... 阅读全文
posted @ 2017-06-08 16:05 繁华似水 阅读(215) 评论(0) 推荐(1)
摘要: $("#id").click(function() { var shuju = $("#id").val(); $.ajax({ url:"链接处理页面", data:{取到的数据名:要传输的数据名}, type:"POST/GET", //数据传输方式 dataType:"TEXT/JSON", 阅读全文
posted @ 2017-06-08 14:31 繁华似水 阅读(7907) 评论(0) 推荐(0)
摘要: //第几页 var page = 1; //每页显示的条数 var num = 5; //加载数据 Load(); //加载分页 LoadFenYe(); //加载数据的方法 function Load() { var send = $("#cc1").val(); $.ajax( { url:"fenye_chuli.php", data:{page:page,num:... 阅读全文
posted @ 2017-06-08 14:21 繁华似水 阅读(157) 评论(0) 推荐(0)
摘要: function JSONQuery($sql,$type=1) { $db = new MySQLi($this->host,$this->uid,$this->pwd,$this->dbname); $r = $db->query($sql); if($type == 1) { return j 阅读全文
posted @ 2017-05-24 08:53 繁华似水 阅读(141) 评论(0) 推荐(0)
摘要: public function StrQuery($sql,$type=1) { $db = new MySQLi($this->host,$this->uid,$this->pwd,$this->dbname); $r = $db->query($sql); if($type=1) { $arr 阅读全文
posted @ 2017-05-23 15:24 繁华似水 阅读(535) 评论(0) 推荐(0)
摘要: <?php class Dadb { public $host = "localhost"; public $uid = "uid"; public $pwd = "pwd"; public $dbname = "test"; function query($sql,$type=1) { $db = 阅读全文
posted @ 2017-05-23 15:18 繁华似水 阅读(79) 评论(0) 推荐(0)
摘要: <?php require ""; 命令 进入封装的类 $db = new "类文件名或数据库名"; $sql = ""; sql语句 引用的数据库 阅读全文
posted @ 2017-05-16 15:06 繁华似水 阅读(130) 评论(0) 推荐(0)