会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
荷西呀
博客园
首页
新随笔
联系
管理
订阅
[置顶]
PHP打包zip并下载
摘要: $file_template = FCPATH.'canddata/cand_picture.zip';//在此之前你的项目目录中必须新建一个空的zip包(必须存在) $downname = $card.'.zip';//你即将打包的zip文件名称 $file_name = FCPATH.'cand
阅读全文
posted @ 2018-06-12 14:32 王浩栋
阅读(4322)
评论(0)
推荐(0)
2019年7月2日
PHP用Qrcode生成二维码base64流
摘要: require_once('../application/helpers/my_qrcode_helper.php'); //由于phpQrcode类直接返回到浏览器,所以需要利用php缓冲器阻止他直接返回到浏览器,然后捕捉到二维码的图片流 ob_start();//开启缓冲区 QRcode::pn
阅读全文
posted @ 2019-07-02 13:13 王浩栋
阅读(6038)
评论(0)
推荐(0)
2019年6月26日
解决手机拍照,照片在PC浏览器旋转
摘要: //$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 王浩栋
阅读(571)
评论(0)
推荐(0)
2018年8月15日
PHP删除临时文件
摘要: /** * 下载后直接删除临时文件 */ public function deldir($dir) { $dh=opendir($dir); while ($file=readdir($dh)) { if($file!="." && $file!="..") { $fullpath=$dir."/"
阅读全文
posted @ 2018-08-15 17:14 王浩栋
阅读(871)
评论(0)
推荐(0)
Jquery无刷新上传单个文件
摘要: 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 王浩栋
阅读(287)
评论(0)
推荐(0)
2018年6月12日
PHP读取excel
摘要: $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 王浩栋
阅读(187)
评论(0)
推荐(0)
PHP读取zip包
摘要: $filename = $this->upload->data('file_name'); //得到文件夹(此处是CI框架上传文件之后得到文件名称) $file_root = 'canddata/'.$time.'/'.$filename;//确定你上传的zip包的目录 $zip = new Zip
阅读全文
posted @ 2018-06-12 14:15 王浩栋
阅读(588)
评论(0)
推荐(0)
PHP导出excel
摘要: //此方法导出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 王浩栋
阅读(162)
评论(0)
推荐(0)
公告