摘要: function httpcode($url){ $ch = curl_init(); $timeout = 3; curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_HEADER, ... 阅读全文
posted @ 2018-07-24 18:05 zrn 阅读(292) 评论(0) 推荐(0) 编辑
摘要: public function import_table(){ $table=input('table'); //获取表格的大小,限制上传表格的大小5M $file_size = $_FILES['file']['size']; if ($file_size>5*1024*1024) { echo "上传失败... 阅读全文
posted @ 2018-07-02 16:31 zrn 阅读(224) 评论(0) 推荐(0) 编辑
摘要: //导出模板 public function export_model(){ //ini_set(memory_limit,'1024M'); vendor("PHPExcel.PHPExcel"); vendor("PHPExcel.Reader.Excel2007"); vendor("PHPExcel.IOFact... 阅读全文
posted @ 2018-07-02 16:30 zrn 阅读(1016) 评论(0) 推荐(0) 编辑
摘要: 当前url:http://api.gigacre.xyz:10380/home/info/focus_area.php 阅读全文
posted @ 2018-06-25 14:15 zrn 阅读(20146) 评论(0) 推荐(0) 编辑
摘要: public function water_log_export(){ ini_set(memory_limit,'1024M'); // $data = $m->field('eq_id,img,create_time,loss,last_loss,ps_id')->select(); $data=M() ->table(a... 阅读全文
posted @ 2018-04-12 16:49 zrn 阅读(335) 评论(0) 推荐(0) 编辑
摘要: //判断浏览器是否为手机端 function isMobile(){ // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) return true; //此条摘自TPM智能切换模板引擎,适合TPM开发 if(isset ($_SERVER['HTT... 阅读全文
posted @ 2018-02-08 10:19 zrn 阅读(224) 评论(0) 推荐(0) 编辑
摘要: function createTimeArray($format_date='Y-m',$start_time,$end_time) { $data=[]; if($format_date=='Y-m') { if($end_time==0){ $end_time=date('Y-m',time()); } ... 阅读全文
posted @ 2018-02-08 10:16 zrn 阅读(117) 评论(0) 推荐(0) 编辑
摘要: cookie的domain和path属性: 1、domain 表示cookie所在的域,默认为请求的地址,如网址为JavaScript.exam.cn/JavaScript/read.html,那么domain默认为JavaScript.exam.cn。如域A为catagory.exam.cn,域B 阅读全文
posted @ 2018-02-05 16:28 zrn 阅读(742) 评论(0) 推荐(0) 编辑
摘要: 此为function函数中的内容 此为模板调用方法 阅读全文
posted @ 2018-02-02 10:41 zrn 阅读(176) 评论(0) 推荐(0) 编辑
摘要: $company打印出来是个这样格式的三维数组, 我要把date塞到最里层数组的每条数据下 最终的数组: 三维数组转二维数组只需遍历两遍,两个简单的foreach就搞定了~ 阅读全文
posted @ 2018-02-02 10:28 zrn 阅读(364) 评论(0) 推荐(0) 编辑