⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 viewer.pm

📁 本文件为Web-FTP的实现源代码 是cgi编程 使用perl为主 本软件适用于linux下
💻 PM
字号:
#!/usr/bin/perlpackage viewer;sub new {    my %self;    shift;    %self = @_;    $_ = bless \%self;    return $_;}sub new_file {    my $self = shift;}sub EDITMAIN {    my $self = shift;    $self->{conf}{CURRENTEDIT} =~ /([^\.]+)$/;    my $ext = $1;    if($ext && -f $self->{conf}{mimefile}) {	open(MIME, $self->{conf}{mimefile}) or return;	while(<MIME>) {	    next if /^[\#\s]/;	    next unless /\b\Q$ext\E\b/i;	    $self->{contenttype} = ((split /\s+/, $_, 2)[0]);	    $self->{contenttype} =~ s|^text/.*|text/plain|;	    last;	}    }    unless($self->{contenttype}) {	if($self->{conf}{EDITDATA} =~ /[\x80-\xff]/) {	    $self->{contenttype} = "Application/Octet-Stream";	} else {	    $self->{contenttype} = 'text/plain';	}    }    $self->{conf}{specialheader} = "Connection: close\n";    $self->{conf}{specialheader} .= qq`Content-Type: $self->{contenttype};name="$self->{conf}{CURRENTEDIT}"\n`;    $self->{conf}{specialheader} .= qq`Content-Disposition: attachment;filename="$self->{conf}{CURRENTEDIT}"\n\n`;    return \$self->{conf}{EDITDATA};}1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -