我一直在写一个HTML界面,用于显示表,饼图,数据等HTML和perl,返回脚本文本代替运行
产生的数据和表格的Perl脚本可以通过一个单一的调用命令在终端上,我想要一个按钮在HTML中,这将调用此。我不需要真的需要Perl脚本的任何反馈,但如果它能够回复“一切都比预期更好”,那就太好了。
但是,目前我每次点击提交时都会被要求打开或保存Perl脚本,经过一天的搜索,我无法修复它,并希望得到一些建议。
我是新来的HTML和JS,但是这是我到目前为止有:
<form action="scripts/do_processing.pl" method="get">
<table>
<td>Select input file: (must be fasta format)</td>
<td>
<input type="file" name="first_name" value="" maxlength="100" />
</td>
</tr>
<br>
<tr>
<tr><td>Binning:</td>
<td>
<input type="radio" name="bin_method" value="blastn" /> Blastn
<input type="radio" name="bin_method" value="blastx" /> Blastx
<input type="radio" name="bin_method" value="megan" /> Megan
</td>
</tr>
</table>
<br><br>
<input TYPE=IMAGE
SRC="images/go_button-green.jpg"
HEIGHT=100 WIDTH=auto
ALT="Go!" BORDER=0
NAME="go"
>
</td>
</tr>
</form><br>
只有在本地跑了,我也没打算把它向外界访问,我因此避免了我认为不必要的CGI和Apache式解决方案。每次尝试打开文件时链接都很好。
注意:输入与此刻不相关,因为我目前试图调用的perl脚本只是一个“Hello World!”。
当您说“本地运行”时,您的意思是指点击在链接上运行他们的计算机上的脚本 - 服务器不运行脚本? – 2012-01-04 17:15:59
你使用某种网络服务器?即使像[starman](http://p3rl.org/starman)或[plackup](http://p3rl.org/plackup)或[Starlet](http://p3rl.org/Starlet)或真的任何[PSGI服务器](http://metacpan.org/search?q=psgi+server)。 – 2012-01-04 17:24:29
真的,你应该看看[舞者](http://perldancer.org)[Mojolicious](http://mojolicio.us)[Catalyst](http://catalystframework.org)或[梅森](http: //masonhq.com)。它们都将运行在[PSGI兼容的服务器]上(http://metacpan.org/search?q=psgi+server)。 – 2012-01-04 18:26:00