摘要:webpack 默认不能处理vue文件,需要安装对应的load才可以 1.安装vue-loader和vue-template-compiler npm install vue-loader vue-template-compiler --save-dev 2.修改webpack.config.js 阅读全文
摘要:把图片1.jpg转成1.webp,1.jpg是图片的真实地址 $img = new \Imagick("1.jpg"); $img->setImageFormat("webp"); $img->writeImage("1.webp"); 阅读全文
摘要:1、点击cookies添加cookie如下 2、添加域名 3、点击add cookie,在最前面加上XDEBUG_SESSION=PHPSTORM;即可 阅读全文
摘要:1、确保电脑的防火墙是关闭状态 2、如果还是不行的话,把手机wifi断掉后重新连接 阅读全文
摘要:输入 $git remote add origin https://github.com/用户名/项目.git,提示fatal: remote origin already exists. 解决办法: 1 、先输入$ git remote rm origin 2、再输入git remote add 阅读全文
摘要:var str = '2016060520103600466'; var str=str.replace(/\s/g,'').replace(/(.{4})/g,"$1 "); alert(str); 阅读全文
摘要:/** * @param $lat1 纬度1 43.123456 * @param $lng1 经度1 87.123456 * @param $lat2 纬度2 * @param $lng2 经度2 * @return int|string 距离 m */ public function getdi 阅读全文
摘要:1、输入cmd进入命令行窗口。 2、进入到MySQL安装目录,比如我的安装目录是C:\mysql,进入C:\mysql\bin; 3、跳过权限检查。 c:\mysql\bin>mysqld ––skip-grant-tables。 4、重新打开一个命令行窗口,进入C:\mysql\bin;(在此步骤 阅读全文
摘要:当用户触发事件,如果不能保证在5s内响应,可以先返回success,然后异步调用返回的信息。代码如下: 阅读全文