- 论坛徽章:
- 0
|
#!/usr/bin/perl
use CGI;
use CGI qw(:all);
use CGI::Carp qw(fatalsToBrowser);
print header;
print start_html('UNAFold result');
print "Content-type: text/html\n\n";
my $req = new CGI;
my $textarea = $req->param("typedseq");
print qq(<p>$textarea<p>);
open (SEQ,">temp.seq");
print SEQ "$textarea";
close SEQ;
system("mfold MAX=1 SEQ='temp.seq'"); #此句为调用/usr/local/bin下的命令 就这条命令失效了,为什么?
system("cp temp\_1.ct temp\_1.out temp\_1.pdf temp.seq /var/www/html/storage/"); #temp\_1.ct ...为调用mfold后产生的文件
print qq(<p>the UNAFold result:<p> \t<a href=/storage/temp\_1.pdf>temp\_1.pdf</a><p>);
print qq( \t<a href=/storage/temp\_1.ct>temp\_1.ct</a><p>);
print qq( \t<a href=/storage/temp.seq>temp.seq</a><p>);
print qq( \t<a href=/UNAFold/default_03_02.html>return</a><p>);
print qq($message<P>);
print end_html(); |
|