首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

Apache何时加载模块有关问题

2012-03-09 
Apache何时加载模块问题现在已经能localhost/helloworld加载自已的helloworld模块但是这个hello模块是C的,

Apache何时加载模块问题
现在已经能localhost/helloworld加载自已的helloworld模块
但是这个hello模块是C的,而且也用了Hook
LoadModule helloworld_module /usr/lib/apache2/modules/mod_helloworld.so
<Location /helloworld>
  SetHandler helloworld
</Location>
现在是想不用勾子,而是写一个接口函数,类似下面
string showSth(){
return "<br />This is a test";
}
和PHP一起被调用,例如//index.php
<?php
echo "AAAAAAA";
?>
showSth();
//结果为//localhost/index.php
AAAAAAA
This is a test
是想要这样的效果
我觉既然PHP和我的都Load了,应该可以同时调用吧-----------------------(1)
PHP在<?php 与?>之间调用,是在什么地方设定的------------------------(2)
模块必需要用HOOK吗?用C++主文件必须用C编译吗(extern "C") -----------(3)
高手帮忙回答

[解决办法]
这好像是c语言区啊。。。。帮顶了。。

热点排行