![]() |
|
|||||||
| 服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。 |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
IP: 112.84.220.79
|
|||
|
|||
|
有时候为了安全需要对网站某个目录禁止掉执行PHP的权限,实现这个需求有两种比较简单的方法:
一、在.htaccess文件限制: 在需要限制执行php的目录下,创建.htaccess文件,加入内容 php_flag engine off 即可。 二使用apache的配置文件httpd.conf,在相对应的的虚拟主机段,加入 Code:
<Directory /www/htdocs/path> php_admin_flag engine off </Directory> |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|