- 论坛徽章:
- 0
|
我现在创建有一个module,代码如下
- package about.pm;
- use 5.005;
- require Exporter;
- @ISA = qw(Exporter);
- %EXPORT_TAGS = ( 'all' =>; [ qw() ] );
- @EXPORT_OK = qw( @{ $EXPORT_TAGS{'all'} } );
- @EXPORT = qw(
- PrintHead
- PrintEnd
- ShowAboutForm
- );
- $VERSION = '0.01';
- sub PrintEnd {
- print qq~
- </body>;
- </html>;
- ~;
- }
- sub ShowAboutForm{
- print qq~
- <form name="form1" method="post" action="">;
- <table width="100%" border="0" cellpadding="2" cellspacing="2" class="text-x">;
- <tr>;
- <td colspan="2">;<hr>;</td>;
- </tr>;
- <tr >;
- <td colspan="2" class="text" background="../image/bgs.jpg">;&</td>;
- </tr>;
- <tr bgcolor="#FFFFFF">;
- <td colspan="2">; <div align="center">;
- <table width="100%" border="0" cellpadding="2" cellspacing="2" class="gen-text-9pt">;
- <tr class="text-x">;
- <td width="14%">;&</td>;
- <td width="86%">;<img src="../image/logo.jpg" width="269" height="94">;</td>;
- </tr>;
- <tr class="text-x">;
- <td>;&</td>;
- <td>;<strong>;版本:3.0.0</strong>;</td>;
- </tr>;
- <tr class="text-x">;
- <td>;&</td>;
- <td>;&</td>;
- </tr>;
- <tr class="text-x">;
- <td>;&</td>;
- <td>;
- <textarea name="textarea" cols="100" rows="6" readonly="true" class="form-text-d">;本软件受国际版权法保护,版权所有!请尊重所有人的权益,否则将受到最严厉的法律制裁。并将因此受到最大限度的民事赔偿追究。</textarea>;</td>;
- </tr>;
- <tr class="text-x">;
- <td>;&</td>;
- <td>;&</td>;
- </tr>;
- <tr class="text-x">;
- <td>;&</td>;
- <td>;版权所有 ( C ) 2003-2004, XXXXXX有限公司</td>;
- </tr>;
- <tr class="text-x">;
- <td>;&</td>;
- <td>;<a href="http://www.company.com">;http://www.company.com</a>;</td>;
- </tr>;
- <tr>;
- <td>;&</td>;
- <td>;&</td>;
- </tr>;
- <tr>;
- <td>;&</td>;
- <td>;&</td>;
- </tr>;
- </table>;
- </div>;</td>;
- </tr>;
- <tr>;
- <td colspan="2">;&</td>;
- </tr>;
- <tr>;
- <td colspan="2">;&</td>;
- </tr>;
- </table>;
- </form>;
- ~;
- }
- 1;
复制代码
调用该module的代码如下
about.pl
- #!/usr/bin/perl
- use about;
- PrintHead;
- ShowAboutForm;
- PrintEnd;
复制代码
在后台可以正常把那些内容打印到屏幕,但是就不显示不了正常的
网页,web服务器保证配置没有问题
但是如果不是用module,直接把代码
copy到about.pl中就可以显示页面
请问是什么问题,谢谢 |
|