📄 insipid.cgi
字号:
#!/usr/bin/perl -wuse strict;# This stub checks for libraries and what not and then calls the main program.push(@INC, "lib");if(!-e "insipid-config.cgi") { # TODO: Better error message here. show_error("Configuration file missing", "The \"insipid-config.cgi\"" . " file could not be found.");}eval { require Insipid::Main; Insipid::Main::main();};if($@) { my $errstr = $@; if($errstr =~ /Can\'t locate (.*) in/) { show_error("Couldn't find the module \"$1\".", "You may want to " . "<a href=\"http://search.cpan.org/\">search CPAN</a> " . "for the module or check the " . "<a href=\"http://www.neuro-tech.net/insipid/\">" . "Insipid</a> homepage for more information."); } elsif ($errstr =~ /Couldn\'t acquire lock on id/) { # This means that a database connection was establishd but the # tables were not found. eval { require Insipid::Database; Insipid::Database::install(); }; if($@) { show_error("Database error", "There was a problem " . "creating the database tables required by Insipid."); } } else { print "Content-Type: text/plain\r\n\r\nError: $@\r\n"; }}sub show_error { my ($subject, $body) = (@_); print "Content-Type: text/html\r\n\r\n"; print "<html><head><title>Insipid Error</title></head>"; print "<body>"; print "<h2>$subject</h2>"; print "<p><font size=\"+1\"></font></p>"; print "<p><font size=\"+1\">$body"; print "</font></p></body></html>"; exit;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -