在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;
}
copy © 2025 星澜网络 All Rights Reserved
备案号:鲁ICP备2023015769号