Server Push 範例

範 例 結 果 展 示

   1: #include <gd.h>
   2: print "content-type: multipart/x-mixed-replace;boundary=separator\n\n";
   3: open(LISTS,"$ENV{'PATH_INFO'}") || die "open @ARGV[0] failure: $!";
   4: foreach (<LISTS>) {
   5:         chop $_;
   6:         print "\n--separator\n";
   7:         print "content-type: image/gif\n\n";
   8:         open (SHOW, $_);
   9:         print <SHOW>;
  10:         close (SHOW);
  11: }
  12: print "\n--separator--\n";
  13: close(LISTS);
  14: >

INTERNET STUDIO 網路教材
若有任何建議或意見, 歡迎寫信到 tutor@www.fido.net.tw