location / {
...
proxy_set_header Accept-Encoding "gzip";
...
proxy_pass ...;
}
PHP笛卡尔积的一种实现方式
_reindex
__construct、register_shutdown_function、__destruct执行顺序
run __construct
run shutdown_function
run __destruct
* unset 等操作可以提前触发 __destruct
可以利用变量作用域在__destruct内来释放连接、解锁等释放操作
深度优先搜索 dfs php版
启用 opcache.enable_cli 也需要小心
opcache.enable_cli + xdebug + swoole 可能会导致“段错误”(Segmentation fault)
慎用Nginx限流功能,不要一直开着nginx限流
nginx限流可能会导致客户访问感知到变慢,所以在怕爬虫或攻击停止的时候应该关闭限流!
限流的阈值、突发速率之类的需要尽量大点,大概峰值的几倍这样,防止正常用户被迫全局限流。
$realpath_root 和 $document_root 区别
Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this operation
root@% 无法修改 root@localhost 密码
解决办法:(自己给自己授权)
grant system_user on *.* to 'root';
https://blog.csdn.net/weixin_42330311/article/details/104728396
ln -s 两次无限递归问题:给目录创建两次软链接会出现无限递归
例如:
ln -s /var/www/php/ /mnt/www/blog
# 第一次会创建出“/mnt/www/blog -> /var/www/php/” 这个软链接
ln -s /var/www/php/ /mnt/www/blog
# 第二次会创建出“/var/www/php/php -> /var/www/php/” 这个软链接
# 第三次会提示 File exists
解决办法:(创建前判断下目标是否存在即可)
[ ! -e /mnt/www/blog ] && ln -s /var/www/php /mnt/www/blog