代码如下: New Web Server Application ,选择 CGI Stand - alone executable ,为何结果没有出现在 Ie 中而是一闪而过 ?
unit Unit1;interfaceuses
  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 := '<h6> 您好 !<h6>' + '现在是 :' + FormatDateTime('yyyy-mm-dd hh:nn:ss',Now) ;
end;end.

解决方案 »

  1.   

    将WebActionItem1的Default属性设置为true即可
      

  2.   

    看来你还不懂得CGI是什么。我想你一定是按F9直接编译运行这个CGI或者双击编译结果吧?
    CGI本质上是一个Web Server Application,是不能直接运行的,你必须将其置于具有应用程序执行权限的Web虚拟目录中,然后通过浏览器调用,如下:http://localhost/scripts/MyCGI.exe这样就可以在浏览器中看到html输出结果。
      

  3.   

    楼上说得对,我怎么没想到楼主连CGI是怎么运行的都不知道。^_^
      

  4.   

    to Raptor(猛禽):
    Web Application初学者经常犯这个错误。