网乐原科技

直播中

news center新闻中心
首页 > 资讯中心 > 软件技术

关于Delphi7的IntraWeb编译的Apache(DSO)模块

发布时间:2008-08-09     阅读数: 次       来源:网乐原科技
一。新检一个intraweb project ,我选  apache1的

library IWDSOProject;

uses
  ApacheApp,
  IWInitApache,
  ServerController in 'ServerController.pas' {IWServerController: TIWServerControllerBase},
  IWUnit1 in 'IWUnit1.pas' {formMain: TIWForm1};

{$E so}

{$R *.RES}

exports
  apache_module name 'IWDSOProject_module';

begin
  IWRun(TFormMain, TIWServerController);
end.


二。编译出IWDSOProject.so , 拷到 /apache/modules 里

三。在 apache/conf/httpd.conf 最后加上
LoadModule IWDSOProject_module modules/IWDSOProject.so
<Location /test>
   SetHandler iwdsoproject-handler
</Location>

四。重启 apache服务。

五。可以浏览了喽!   http://localhost/test/


说明一下:LoadModule IWDSOProject_module modules/IWDSOProject.so
IWDSOProject_module 就是你的delphi里的 apache_module name 'IWDSOProject_module'; 中的IWDSOProject_module

SetHandler iwdsoproject-handler
,这个 iwdsoproject 就是你编译出来的文件(.so)前面的文件名的小写,再后面加上 “-handler”



网乐原科技

客服热线:0771-5761507

QQ:53290011

QQ邮箱:53290011@qq.com

工作时间:周一到周五 9:00-18:00

地址:广西南宁市江南万达写字楼C16栋1309室

物联网开发

关注我们

微信小商店 腾讯QQ客服 微信客服