B
bdzjl
Unregistered / Unconfirmed
GUEST, unregistred user!
我是一个初学者,想试试DELPHI的WEB开发功能,但总是出错。下面是源程序:
----------------------------------------------------------
unit Unit1;
interface
uses
SysUtils, Classes, HTTPApp;
type
TWebModule1 = class(TWebModule)
procedure WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
WebModule1: TWebModule1;
implementation
{$R *.DFM}
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
response.Content :=request.QueryFields.Values['infor'];
end;
end.
-----------------------------------------------------------
编译后,把文件所在目录设为虚拟目录AAA,为什么在IE中输入网址
http://127.0.0.1/aaa/Project1.exe,却提示下载。是编程
有问题,还是IIS设置有问题啊!各位请指教(我用的是winxp+iis5.1)
----------------------------------------------------------
unit Unit1;
interface
uses
SysUtils, Classes, HTTPApp;
type
TWebModule1 = class(TWebModule)
procedure WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
WebModule1: TWebModule1;
implementation
{$R *.DFM}
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
response.Content :=request.QueryFields.Values['infor'];
end;
end.
-----------------------------------------------------------
编译后,把文件所在目录设为虚拟目录AAA,为什么在IE中输入网址
http://127.0.0.1/aaa/Project1.exe,却提示下载。是编程
有问题,还是IIS设置有问题啊!各位请指教(我用的是winxp+iis5.1)