phpoffice/phpspreadsheet生成excel,浏览器下载excel表格方法

composer 安装 phpoffice/phpspreadsheet // 引入 namespace use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; // 创建 $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); // 设置文件名 $fileName = 'cnbattle.xlsx'; // 设置表格数据,当前为循环设置 1000行,25列的数据 $hang = 1000; $lei = 26; for ($x = 0; $x < $lei; $x++) { if ($lei>26){ die('$lei不能大于26'); } $leiStr = chr(65 + $x); for ($i = 1; $i <= $hang; $i++) { $sheet->setCellValue($leiStr . $i, 'value-' . $leiStr . $i); } } //告诉浏览器输出07Exc……

阅读全文

各操作系统的 SSR 客户端地址

平台链接备注 LinuxLinux 客户端一键安装配置使用脚本命令行界面, Mac 也能用,使用方法见注释 Terminaltsocks安装使用教程 WindowsSSR C# 版Windows 推荐使用 Android Android 客户端无 macOSShadowsocksX-NGMac 也能用 Linux 版的 iOS只有中国 App Store 帐号, 美区 App Store 只有中国区 App Store的话会麻烦一些……

阅读全文

[转载]Golang新手可能会踩的50个坑

前言 Go 是一门简单有趣的编程语言,与其他语言一样,在使用时不免会遇到很多坑,不过它们大多不是 Go 本身的设计缺陷。如果你刚从其他语言转到 Go,那这篇文章里的坑多半会踩到。 如果花时间学习官方 doc、wiki、讨论邮件列表、 Rob Pike 的大量文章以及 Go 的源码,会发现这篇文章中的坑是很常见的,新手跳……

阅读全文

阿里dns Let's Encrypt泛域名通配符SSL证书申请

安装acme.sh curl https://get.acme.sh | sh 申请阿里云 accesskey 在此页面申请: https://ak-console.aliyun.com/#/accesskey 开始申请 [root@VM_0_16_centos ~]# export Ali_Key="xxxxxx" // 填写你的key [root@VM_0_16_centos ~]# export Ali_Secret="xxxxxxxxxx" //填写你的 Secret [root@VM_0_16_centos ~]# acme.sh --issue --dns dns_ali -d cnbattle.com -d *.cnbattle.com // 填写你的阿里云下的域名,多个用 `-d` 继续添加即可 成功,显示如下信息就是成功了,可以去部署了,注意不要只有在Apache或Nginx内引用该文件,该文件可能……

阅读全文

Git修改commit的作者信息

全新克隆你的GIT仓库 git clone --bare https://github.com/user/repo.git cd repo.git 修改以下脚本中OLD_EMAIL,CORRECT_NAME ,CORRECT_EMAIL,对应的信息,复制粘贴此脚本,然后按下enter键来运行 #!/bin/sh git filter-branch --env-filter ' OLD_EMAIL="your-old-email@example.com" CORRECT_NAME="Your Correct Name" CORRECT_EMAIL="your-correct-email@example.com" if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] then export GIT_COMMITTER_NAME="$CORRECT_NAME" export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" fi if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] then export GIT_AUTHOR_NAME="$CORRECT_NAME" export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL" fi ' --tag-name-filter cat -- --branches --tags 将修改后的仓库历史推到远……

阅读全文

2018.03.28-04.13 阿里云推荐好友送服务器

推荐有礼 推荐者 新老用户均可 推荐成功 即送最长5年 云服务器 1核 2G 1M带宽 40G SSD硬盘 推荐首位新用户,即送3个月云服务器 推荐新客越多,所获时长越长 参与者 限新用户 ¥99/年超值优惠购 云服务器 1核 2G 1M带宽 40G SSD硬盘 可享最低¥7.8/月特惠价 ¥99元/年,¥189/2年,¥279年/3年……

阅读全文

golang net/http包文档中文版

package http import "net/http" http包提供了HTTP客户端和服务端的实现。 Get、Head、Post和PostForm函数发出HTTP/ HTTPS请求。 <pre>resp, err := http.Get("[http://example.com/](http://example.com/)") … resp, err := http.Post("http://example.com/upload", “image/jpeg”, &buf) … resp, err := http.PostForm("http://example.com/form", url.Values{“key”: {“Value”}, “id”: {“123”}}) 程序在使用完回复后必须关闭回复的主体。 <pre>resp, err := http.Get("[http://example.com/](http://example.com/)") if err != nil { // handle error } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) // … 要管理HTTP客户端的头域、……

阅读全文

ACME v2 and Wildcard Certificate Support is Live

We’re pleased to announce that ACMEv2 and wildcard certificate support is live! With today’s new features we’re continuing to break down barriers for HTTPS adoption across the Web by making it even easier for every website to get and manage certificates. ACMEv21.7k is an updated version of our ACME protocol which has gone through the IETF standards process, taking into account feedback from industry experts and other organizations that might want to use the ACME protocol for certificate issuance and management some day. Wildcard certificates2.0k allow you to secure all subdomains of a domain with a single certificate. Wildcard certificates can make certificate management easier in some cases, and we want to address those cases in order to help get the Web to 100% HTTPS. We……

阅读全文

最近文章

分类

标签

友情链接

其它