在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
use CGI; use CGI qw/:standard/; use Digest::MD5 qw(md5_hex); my $query = CGI->new(\&hook,$PREF_logfh); my $filename = $query->param('uploadname'); ($filename,$file_ext) = ($filename =~ /(.*)\.(.+)$/); my $upload_filehandle = $query->upload('uploadname'); my $tmpFileName = $query->tmpFileName( $upload_filehandle ); print( $tmpFileName ); #取得MD5 my $ctx = Digest::MD5->new; $ctx->addfile( $upload_filehandle ); print( $ctx->hexdigest ); |
请发表评论