开发者

How can I disable auto_prepend in specific folders using htaccess?

开发者 https://www.devze.com 2022-12-12 21:24 出处:网络
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 b

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开发者_StackOverflow中文版 use any other method but I thought I'd start with .htaccess)

ps - I'm using the auto_prepend in php.ini to set the auto_prepend


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"

So, I suppose you could use this to de-activate auto-prepending in a directory :

php_value auto_prepend_file none


Note I am using the special value "none", as explained in the documentation of auto_prepend_file :

The special value none disables auto-prepending.

0

精彩评论

暂无评论...
验证码 换一张
取 消