我怎么能禁止使用htaccess的AUTO_ prePEND在特定的文件夹? [英] How can I disable auto_prepend in specific folders using htaccess?
问题描述
我用我的网站上AUTO_ prePEND,但是我不希望它的每个文件夹中使用。我怎样才能阻止AUTO_ prepending使用的.htaccess某些文件夹中的文件的PHP? (它没有被.htacces,我可以用任何其他方法,但我想我会开始的.htaccess)
I'm using auto_prepend on my website, however I don't want it to be used in every folder. How can I stop php from auto_prepending a file within certain folders using .htaccess? (It doesn't have to be .htacces, I can use any other method but I thought I'd start with .htaccess)
PS - 我使用的是AUTO_ prePEND在php.ini中设置AUTO_ prePEND
ps - I'm using the auto_prepend in php.ini to set the auto_prepend
推荐答案
在的.htaccess
文件,你可以用它来定义一个特定的文件,该文件会自动prepended,在目录:
In a .htaccess
file, you can use this to define a specific file that will be auto-prepended, in a directory :
php_value auto_prepend_file "prepend.php"
所以,我想你可以使用这个目录中的停用自动prepending:
So, I suppose you could use this to de-activate auto-prepending in a directory :
php_value auto_prepend_file none
请注意我用的是特殊值无
,作为<一个文档中解释href="http://php.net/manual/en/ini.core.php#ini.auto-$p$ppend-file"><$c$c>auto_$p$ppend_file$c$c>
特殊值的没有的禁用 自动prepending。
The special value none disables auto-prepending.
这篇关于我怎么能禁止使用htaccess的AUTO_ prePEND在特定的文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!