摘要: 1. 在vue-router中使用import()来代替require.ensure()懒加载实现代码打包分离 const Foo = () => import(/* webpackChunkName: "group-foo" */ './Foo.vue') const Bar = () => im 阅读全文
posted @ 2020-04-11 08:52 码一个大馒头 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 压缩一个文件 我们将一个文件生成一个压缩包。 上述代码将c:/wamp/www/log.txt文件压缩生成了test.zip,并保存在当前目录。 压缩多个文件 压缩多个文件,其实就是addFile执行多次,可以通过数组的遍历来实现 压缩一个目录 压缩并下载zip包 我的时候,我们需要打包之后,提供下 阅读全文
posted @ 2017-09-01 17:09 码一个大馒头 阅读(279) 评论(0) 推荐(0) 编辑
摘要: x-frame-options漏洞,此漏洞是防止外部网页iframe此网站 nginx 解决方法在server中加入 add_header X-Frame-Options SAMEORIGIN 三个选项分别是: DENY:浏览器拒绝当前页面加载任何Frame页面 SAMEORIGIN:frame页面 阅读全文
posted @ 2017-07-13 23:13 码一个大馒头 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1、查看安装的php 2、删除php 3、使用yum remove不能彻底删除,要使用 rpm -e xxxx 把第一步列出的扩展 挨个删除,注意依赖情况 全新安装 1、配置yum源 2、使用yum 查看安装包 3、安装,需要其他扩展包在后边加上即可 php-fpm 加入系统服务随系统启动而启动 第 阅读全文
posted @ 2017-05-04 18:58 码一个大馒头 阅读(131) 评论(0) 推荐(0) 编辑
摘要: my.ini(Linux系统下是my.cnf),当mysql服务器启动时它会读取这个文件,设置相关的运行环境参数。 my.ini分为两块:Client Section和Server Section。 Client Section用来配置MySQL客户端参数。 要查看配置参数可以用下面的命令: 1、C 阅读全文
posted @ 2017-04-23 21:48 码一个大馒头 阅读(751) 评论(0) 推荐(0) 编辑
摘要: set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"md "D:\sql\%Ymd%"D:\mysql-5.7.16-winx64\bin\mysqldump --opt -Q -uroot -p123456 --default-character-set=utf8 阅读全文
posted @ 2017-04-21 12:02 码一个大馒头 阅读(145) 评论(0) 推荐(0) 编辑
摘要: …… //开启header curl_setopt($curl, CURLOPT_HEADER, true); //类型为json curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json; charset=utf-8' ) ); //post传递 curl_setopt($curl, ... 阅读全文
posted @ 2017-04-14 15:55 码一个大馒头 阅读(10366) 评论(0) 推荐(1) 编辑
摘要: 方法一: 0) { //两个字节的文字 $str .= '\u'.base_convert(ord($c), 10, 16).str_pad(base_convert(ord($c2), 10, 16), 2, 0, STR_PAD_LEFT); } else { $str .=... 阅读全文
posted @ 2017-04-11 19:49 码一个大馒头 阅读(722) 评论(0) 推荐(0) 编辑
摘要: 方案1 方案2 两种方案都可以产生随机数 方案1 在for循环的瞬间产生的随机数重复率很低,测试100个以内无重复 方案2 在for循环的瞬间产生的随机数重复率很高 阅读全文
posted @ 2017-04-11 19:07 码一个大馒头 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 转载 http://www.osyunwei.com/archives/7378.html 准备篇 一、环境说明: 操作系统:Windows Server 2012 R2 PHP版本:php 5.5.8 MySQL版本:MySQL5.6.15 二、相关软件下载: 1、PHP下载地址: http:// 阅读全文
posted @ 2016-11-07 13:24 码一个大馒头 阅读(319) 评论(0) 推荐(0) 编辑