摘要: $file_template = FCPATH.'canddata/cand_picture.zip';//在此之前你的项目目录中必须新建一个空的zip包(必须存在) $downname = $card.'.zip';//你即将打包的zip文件名称 $file_name = FCPATH.'cand 阅读全文
posted @ 2018-06-12 14:32 王浩栋 阅读(4295) 评论(0) 推荐(0) 编辑
摘要: require_once('../application/helpers/my_qrcode_helper.php'); //由于phpQrcode类直接返回到浏览器,所以需要利用php缓冲器阻止他直接返回到浏览器,然后捕捉到二维码的图片流 ob_start();//开启缓冲区 QRcode::pn 阅读全文
posted @ 2019-07-02 13:13 王浩栋 阅读(5864) 评论(0) 推荐(0) 编辑
摘要: //$imgSrc为图片base64流if (preg_match('/^(data:\s*image\/(\w+);base64,)/',$imgSrc,$result)){ $imgSrc = base64_decode(str_replace($result[1], '', $imgSrc)) 阅读全文
posted @ 2019-06-26 16:42 王浩栋 阅读(548) 评论(0) 推荐(0) 编辑
摘要: /** * 下载后直接删除临时文件 */ public function deldir($dir) { $dh=opendir($dir); while ($file=readdir($dh)) { if($file!="." && $file!="..") { $fullpath=$dir."/" 阅读全文
posted @ 2018-08-15 17:14 王浩栋 阅读(859) 评论(0) 推荐(0) 编辑
摘要: function ajax_photo(photo_type){ $(document).on('change','#sitephoto',function(){ var formData = new FormData(); formData.append("myfile", document.ge 阅读全文
posted @ 2018-08-15 17:10 王浩栋 阅读(282) 评论(0) 推荐(0) 编辑
摘要: $file = '';//文件名称 $file_ext = explode('.',$file);$file_ext = $file_ext[1];$data['file_ext'] = $file_ext;require '../application/helpers/PHPExcel.php'; 阅读全文
posted @ 2018-06-12 14:44 王浩栋 阅读(180) 评论(0) 推荐(0) 编辑
摘要: $filename = $this->upload->data('file_name'); //得到文件夹(此处是CI框架上传文件之后得到文件名称) $file_root = 'canddata/'.$time.'/'.$filename;//确定你上传的zip包的目录 $zip = new Zip 阅读全文
posted @ 2018-06-12 14:15 王浩栋 阅读(577) 评论(0) 推荐(0) 编辑
摘要: //此方法导出excel,$data的键值必须是0,1,2...这样的数组 public function export_cand($data,$projname,$num){ // 内存加大 ini_set('memory_limit','2048M'); //引入PHPExcel库文件 incl 阅读全文
posted @ 2018-06-12 11:37 王浩栋 阅读(155) 评论(0) 推荐(0) 编辑