在apache下做如下设置:
以apache 模块方式运行 PHP
<Directory /www/www.example.com/upload>
php_flag engine off
</Directory>
<Directory ~ "^/www/.*/upload">
<Files ~ ".php">
Order allow,deny
Deny from all
</Files>
</Directory>
在Nginx下做如下设置:
location /upload/ {
location ~ .*.(php)?$ {
deny all;
}
}
或
location ~* ^/(p_w_uploads|upload)/.*.(php|php5)$
{
deny all;
}
扫描二维码手机查看该文章
文章引用:https://www.qinghuahulian.com/news/webzhishi/1409.html