一. apache在配置文件中加下
<Directory “/home/wwwroot/uploads”>
<Files ~ “.php”>
Order allow,deny
Deny from all
</Files>
</Directory>
二.nginx在配置文件中添加如下
location /uploads {
location ~ .*\.(php)?$
{
deny all;
}
?