Skip to content


可以在http.conf的目录区域增加”php_flag engine”参数,关闭对某个目录的php解析,起到保护的作用。

  1. <VirtualHost *:80>
  2.     DocumentRoot /opt/htdocs/www
  3.     ServerName
  5. <Directory "/opt/htdocs/www/truck>
  6.     php_flag engine Off
  7.     AddOutputFilterByType DEFLATE text/html text/plain text/xml
  8. </Directory>
  9. </VirtualHost>



Posted in Apache, PHP, 技术.

Tagged with , .

No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.