|
|
导航: |
论坛 -> 发布代码
斑竹:liumazi,ruralboy |
|
作者: |
|
2020/8/1 13:26:15 |
标题: |
idhttpserver 封装dll 错误 |
浏览:1943 |
|
加入我的收藏 |
楼主: |
idhttpserver 封装dll之后,创建就不往下走了,不知道咋回事
----------------------------------------------
- |
作者: |
|
2020/8/4 9:05:22 |
1楼: |
procedure TForm1.FormCreate(Sender: TObject); begin try IdHTTPServer1.Bindings.Clear; //要绑定的端口,一定设置此项,这是真正要绑定的端口; IdHTTPServer1.DefaultPort:=365; IdHTTPServer1.Bindings.Add.IP:= '127.0.0.1'; IdHTTPServer1.SessionState:= false; IdHTTPServer1.KeepAlive:= false; IdHTTPServer1.OnConnect := CustomOnConnect; //启动服务器 // IdHTTPServer1.Active := True; except ShowMessage('启动失败!'); end; WEBROOT:=ExtractFilePath(Application.Exename)+'web'; end;
IdHTTPServer1.Active := True;这一句注释掉
----------------------------------------------
-
|
|