4
我想要做的就是从httpd.conf文件传递给我的模块的一些设置,是这样的:如何为我的Apache模块定义自定义配置指令?
<Location /path>
SetHandler mymodule-handler # based on this, the module will kick in and "try" to read settings
MyCustomStringSetting "AStringValue"
MyCustomIntegerSetting 2012
# more
</Location>
如何从模块中得到“AStringValue”和“2012”?
@kobik不,我想用apache的API来获取值,比如ap_get_config_value(“MyCustomStringSetting”);这将返回“AStringValue”,但我没关系类似的东西,将帮助我获得值 – ComputerSaysNo 2012-02-20 11:55:02
@kobik apache通过配置文件中的LoadModule指令加载模块,每个模块注册钩子,因此模块可以请求apache使用API:“嘿,MyCustomStringSetting的设置是什么”,apache响应:“这是它”,我的麻烦是,如何问apache该信息 – ComputerSaysNo 2012-02-20 12:37:24
@kobik抱歉,我不希望它听起来那样,我没有我不知道如何解释我想要达到的目标,这很复杂,这就是为什么我需要自己的帮助。 – ComputerSaysNo 2012-02-20 12:49:38