| 
 
     
- UID
 - 1 
 - 威望
 - 1240 点 
 - 金钱
 - 24019 金币 
 - 点卡
 - 317 点 
 
  | 
1#
 
发表于 2003-8-6 17:15
 |  只看该作者
 
 
 
 比较两种CGI编程风格
- #!/usr/bin/perl
 - use CGI;
 - #$name= adasas;
 - $addr= remote_host;
 - $q= new CGI;
 - print$q->header(-type=>'text/html',
 - -charset=>'gb_2132'
 - );
 - print$q->start_html(-title=>'test',
 - -bgcolor=>'#FFffFF',
 - -author=>'cnangel',
 - -text=>'#000000');
 - $q->p('This is what I mean by '),
 - $q->b('abstracted'),
 - print$q->end_html();
 - exit;
 
  复制代码- #!/usr/bin/perl 
 -  
 - print "content-type:text/html \n\n";
 - if(1 eq 1){&eee;exit;}else{print "error";exit;}
 - sub eee{
 - print<<EOF
 - <html> 
 - <head> 
 - <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
 - <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> 
 - <meta name="ProgId" content="FrontPage.Editor.Document"> 
 - <title>leoboard</title> 
 - <meta http-equiv="refresh" content="1; url=http://www.leoboard.com/cgi-bin/leoboard.cgi"> 
 - </head> 
 - <body> 
 - </body> 
 - </html> 
 - EOF
 - }
 
  复制代码 |   
 
 
 
 
                     我是一个呼吸着现在的空气而生活在过去的人 
               这样的注定孤独,孤独的身处闹市却犹如置身于荒漠 
                                     我已习惯了孤独,爱上孤独 
                                 他让我看清了自我,还原了自我 
                             让我再静静的沉思中得到快乐和满足 
                                   再孤独的世界里我一遍又一遍 
                                   不厌其烦的改写着自己的过去 
                                             延伸到现在与未来 
                                       然而那只是泡沫般的美梦 
                                 产生的时刻又伴随着破灭的到来 
                         在灰飞烟灭的瞬间我看到的是过程的美丽 
                                      而不是结果的悲哀。。。 
 | 
 
 
 
 |