IIS、Apache、Nginx禁止目录执行php脚本方法
1. IIS实现方😕法
IIS比较简😵单,按图中设置就可以了
2. Apache实现方法
方法一【fāng fǎ yī】⚽
<Directory "/var/www/html/attachments">
<Files ~ ".php">
Order allow,deny
Deny from all
</Files>
</Directory>
方法二【fāng fǎ èr】🌉
<Directory "/var/www/html/attachments">
php_admin_flag engine off
</Directory>
方法三【fāng fǎ sān】
在💎.htaccess中写入
RewriteEngine on RewriteCond % !^$
RewriteRule attachments/(.*).(php)$ - [F]
3. Nginx实现方法【fǎ】🧢
location ~ /attachments/.*\.php$ {
deny all;
}
关键词🔚:IIS,Apache,Nginx,php脚本【jiǎo běn】
阅读本文后您有什么感想? 已有 人给出评价!
- 0
- 0
- 0
- 0
- 0
- 0