strtotime 大小月的问题


date("Y-m-d",strtotime("-1 month", strtotime('2018-03-31')));
//输出的是2018-03-03, 是因为系统获取到的是2018-02-31 再做日期规范化 就是2018-03-03了
//那怎么办呢
//从PHP5.3开始 date新增了修正短语,"first day of" 和 "last day of", 限定好不让date自动"规范化"
date("Y-m-d H:i:s", strtotime("first day of -1 month", strtotime("2018-03-31")));
date("Y-m-d H:i:s", strtotime("last day of -1 month", strtotime("2018-03-31")));

nginx 配置

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443;
server_name www.domain.com;
ssl on;
ssl_certificate conf.d/ssl/xxx.pem;
ssl_certificate_key conf.d/ssl/xxx.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location /ssl {
proxy_pass http://127.0.0.1:port;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

root /home/wwwroot/www.domain.com/public;
index index.php index.html;
gzip on;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(gif|jpg|jpeg|png|js|css|ico)$
{
if (!-f $request_filename) {
return 404;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
fastcgi_intercept_errors on;
}

server {
listen 80;
server_name www.domain.com;
rewrite ^(.*) https://www.domain.com permanent;
}

Linux svn操作


yum install subversion

cd /data/svn

svnadmin create test

cd test/conf
vim server.conf
将anon-access = read 前的注释去掉,再将read 改成none
将password-db = passwd 的注释去掉

vim passwd
在底部添加username = password
如:zhangsan = 123456.

启动
svnserve -d -r /data/svn