月度归档:2017年04月
ecshop 摩宝支付
mysql 的 information_schema 库
https://dev.mysql.com/doc/refman/5.7/en/information-schema.html
利用 information_schema 可以做很多事,这个库存储了mysql的元数据!
比如:
1)查询存在哪些 表是 innodb 的
2)查询 innodb 表的大小
3)查询某字段的定义
例子
SELECT table_schema,table_name, table_rows,
ROUND((data_length+index_length)/1024/1024) AS total_mb,
ROUND(data_length/1024/1024) AS data_mb,
ROUND(index_length/1024/1024) AS index_mb
FROM INFORMATION_SCHEMA.TABLES WHERE engine=’InnoDB’
ORDER BY total_mb desc;
七牛上传报401错误
如果你确信代码没啥毛病的话,就看看你服务器的时间是不是和当前真实时间相差过大!
php的win版本的一点编译解释
和本文一样的内容 是 这里
vc09 = Visual Studio 2008
vc10 = Visual Studio 2010
vc11 = Visual Studio 2012 2012
vc12 = Visual Studio 2013 2013
vc14 = Visual Studio 2015 2015
vc15 = Visual Studio 2017
VC11, VC14 & VC15
More recent versions of PHP are built with VC11, VC14 or VC15 (Visual Studio 2012, 2015 or 2017 compiler respectively) and include improvements in performance and stability.
– The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed
– The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
– The VC15 builds require to have the Visual C++ Redistributable for Visual Studio 2017 x64 or x86 installed
TS and NTS
TS refers to multithread capable builds. NTS refers to single thread only builds. Use case for TS binaries involves interaction with a multithreaded SAPI and PHP loaded as a module into a web server. For NTS binaries the widespread use case is interaction with a web server through the FastCGI protocol, utilizing no multithreading (but also for example CLI).
nginx 的ssl ,单ip多名ssl,以及方便脚本
首先,nginx 单ip多域名的ssl配置,参考地址是
另外,利用 脚本可以比较方便的使用 lets-encrypt 提供的免费ssl,
https://github.com/xdtianyu/scripts/tree/master/lets-encrypt
一个配置文件的例子 letsencrypt.conf-myssl
ACCOUNT_KEY=”letsencrypt-account.key”
DOMAIN_KEY=”/www/ssl/myssldomain.com.key”
DOMAIN_DIR=” /www/myssldomain”
DOMAINS=”DNS:myssldomain.com,DNS:www.myssldomain.com”
方法就是配置 conf文件,然后运行就好了,
letsencrypt.sh letsencrypt.conf-myssl
上面脚本就能自动帮你做注册和生成key的动作。后面只需要修改nginx的配置文件即可
nginx的配置文件,这样写
server
{
listen 80;
listen 443;
if ($scheme = http) {return 301 https://$server_name$request_uri;}
server_name www.myssldomain.com myssldomain.com;
root /www/myssldomain/;
index index.php index.html;
include php.conf;
ssl on;
ssl_certificate “/www/ssl/myssldomain.chained.crt”;
### 注意这里,最好用chained.crt 容易被多数浏览器支持
ssl_certificate_key “/www/ssl/myssldomain.com.key”;
}