LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 957|回复: 3

求教:etchat37聊天室软件出错问题

[复制链接]
发表于 2004-3-23 14:41:30 | 显示全部楼层 |阅读模式
[error]Name "Main::chkkickbylevel" used only once:possible typo at /var/www/cgi-bin/chat/viewonline.cgi line 10-14,21-27,

原文件代码如下:
#!/usr/bin/perl -w
use strict

$cgihead = "/usr/home/chat37/subfunc";  

do "$cgihead/config.cgi"; # 读入设置文件

if ((-s "$filehead$kickfile")>0) {
$statsno=time+(3600*$time_miss);
@kick=&readtxtfile($kickfile,1);
@kick=sort @kick;
if ($#kick>=0) {
  foreach (@kick) {   
   ($mark,$chkuserip,$chkusername,$chkuserlevel,$chkusercookie,$chknewcookie,$chkkickoutway,$chkkickway,$chkkickbylevel,$chkkickno,$markend,$last)=split(/‖/,$_);
   if (($mark eq "kick") && ($markend eq "end") && ( ($chkkickno +$kicktime)> $statsno) ) {
     $kickuserdata{$chkusername}=$chkkickno;
   }
  }
}
}
@online=&readtxtfile($onlinefile);
@online=sort @online;
$onlinecount=0;
$people="";
foreach (@online) {
   ($mark,$chkuserip,$chkusername,$chkuserlevel,$chkusersex,$chktimen,$chksecn,$chkusercookie,$chknewcookie,$chkuserproxy,$markend,$last)=split(/‖/,$_);
    if (($temp ne "$chkuserip‖$chkusername‖$chkuserlevel") && ($kickuserdata{$chkusername} eq "") && ($chkuserlevel<$level_hide)) {
    $onlinecount++;
           $people .= "<option ";
           $people .= "style='colorusersexcolor{$chkusersex}'" if ($usersexcolor{$chkusersex});
           $people .= ">$chkusername";
           $people .= "</option>\n";
   $temp="$chkuserip‖$chkusername‖$chkuserlevel";  
       
   }
}

print "Content-type: text/html;CHARSET=gb2312\n\n";

print qq~

<html>
<META HTTP-EQUIV=REFRESH CONTENT="60;URL=$ENV{'SCRIPT_NAME'}">
<body topmargin="0" leftmargin="0" bgcolor="#F4F9FF">
<SELECT><option style='color:purple'>在线 $onlinecount 人</option>
$people
</SELECT>
~;
exit;

sub readtxtfile {
open(READTXTFILE,"$filehead$_[0]");
@readtxtfile=<READTXTFILE>;
close(READTXTFILE);
return @readtxtfile;
}
发表于 2004-3-23 15:13:52 | 显示全部楼层
#!/usr/bin/perl -w
里面的-w拿掉就行了
发表于 2004-3-23 15:19:26 | 显示全部楼层
#use strict
 楼主| 发表于 2004-3-23 23:04:59 | 显示全部楼层
搞定了,谢谢各位。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表