面朝大海,春暖花开
前几天曝出来的phpdos漏洞挺可怕,第一时间就升级了php,但是升级后wordpress一直提示有新翻译可用点击更新以后也没有反应,提示依然存在,搜索了一下,原因其实我之前遇到过,php没有开启scandir函数,因为之前开启了,更新以后又恢复了还是跟以前解决wordpress后台不能显示主题的方法一样开启scandir函数打开php.ini 搜索 disable_functions然后找到 scandir 删除保存,重启PHP然后再到仪表盘更新一下翻译,就可以了,到此搞定注:我用的是LNMP配置的环境php.ini的目录是/usr/local/php/etc/php.ini,不同安装包配置的目录可能稍有差异,请自行查询
今天遇到一个PNG 过大的问题,但是PS 怎么都压缩不了,一个60*60的小图片竟然要15K搜了一下PNG 压缩,最好用的就是https://tinypng.com/了上传图片,压缩好下载,我的图片压缩率竟然是97% 15K 压缩以后0.5K都不到,这对于小带宽的服务器无疑是巨大的福音啊如果是多图的网站,用tinypng提供的API压缩以后,应该能大大减少图片体积,提高访问速度,非常推荐
办法很简单,因为42版本以后的chrome禁用了NPAPI,启用就可以解决了启用方法是,在chrome地址栏里输入chrome://flags/#enable-npapi第一项就是NPAPI的启动选项点击启用就可以了,重启浏览器,搞定
六月初,博客打开速度就非常非常慢同一个vps上的其他站就正常,一直不知道为什么今天买了个阿里云,装好wordpress,速度还是奇慢无比就知道肯定是有问题的,google了一下,我草 是因为GFW墙了谷歌的所有服务导致wordpress主题里面需要加载谷歌字体库解决办法是字体库替换打开wordpress代码中的wp-includes/script-loader.php文件,搜索fonts.googleapis.com找到如下代码// Hotlink Open Sans, for now $open_sans_font_url = "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets";将其中的fonts.googleapis.com替换为fonts.useso.com即可改善。这个方法的原理就是不再去美国服务器(google服务器已经从香港搬走了)请求google字体,改为从360的开放代码库中获得,速度自然快上不少。此段转载
昨天装了一个新的电脑技嘉B85M-DS3H 装好以后始终无法点亮,CPU风扇5秒停一次,然后继续,屏幕不亮换内存,换内存插槽始终无法解决因为现在技嘉的主板都不附带主板上的那个小喇叭了没有办法想听听是什么报警声,在老主板上找来小喇叭插上开机,顺利点亮,一切正常突然想起来2月份的那个H87M-HD3的板子貌似也是一样的问题怎么都点不亮,插上喇叭就点亮了不知道有没有同学跟我遇到同样的问题,如果新主板第一次点不亮找个小喇叭装上试试吧
Frey