How can I continuously inform the user of progress from a Perl CGI script?

前端 未结 6 708
一整个雨季
一整个雨季 2021-01-13 12:04

I have this Perl script sitting in the cgi-bin folder of my Apache server:

#!/usr/bin/perl 
use strict;
use warnings;

$| = 1;

print \"Content-type: text/ht         


        
6条回答
  •  旧时难觅i
    2021-01-13 12:16

    Assuming you are using a version of Apache newer than 1.3, this should work. otherwise, You'll have to make your script into an NPH (No Parsed Headers) CGI, meaning its filename should be prefixed with nph- and it should output complete HTTP headers, eg.

    HTTP/1.1 200 OK\n
    Content-type: text/html\n\n
    

    see the (somewhat old)Apache FAQ for more info

提交回复
热议问题