Nginx server { }里添加如下内容:


location ~ /(upload|templates)/.*\.php.*$ {
               deny all;
}