网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > 服务器环境搭建
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。

Reply
 
Thread Tools Display Modes
  #1   IP: 112.84.220.79
Old 2016-06-10, 07:11 AM
Christiansburg Christiansburg is offline
初级会员
 
Join Date: 2011-10-23
Posts: 1
Christiansburg 现在声名狼藉
Default apache限制某个目录下的php文件不可以没有执行

有时候为了安全需要对网站某个目录禁止掉执行PHP的权限,实现这个需求有两种比较简单的方法:
一、在.htaccess文件限制:
在需要限制执行php的目录下,创建.htaccess文件,加入内容 php_flag engine off 即可。

二使用apache的配置文件httpd.conf,在相对应的的虚拟主机段,加入

Code:
<Directory /www/htdocs/path>
 php_admin_flag engine off
 </Directory>
ps: 此处配置要使用绝对路径,经测试相对路径是无效的。
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:58 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.