Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将html中浏览按钮的值传递给perl程序_Html_Perl - Fatal编程技术网

如何将html中浏览按钮的值传递给perl程序

如何将html中浏览按钮的值传递给perl程序,html,perl,Html,Perl,我有一个html页面,其中我使用了一个浏览按钮,允许用户在系统中浏览文件。当我按下submit按钮时,会调用一个perl脚本。我想将用户选择的值传递给perl程序 Html代码: <form NAME="form1" ACTION="/cgi-bin/sample.pl" METHOD="POST"> <center> <input type="file" name="selectFile" /> </center>

我有一个html页面,其中我使用了一个浏览按钮,允许用户在系统中浏览文件。当我按下submit按钮时,会调用一个perl脚本。我想将用户选择的值传递给perl程序

Html代码:

<form NAME="form1" ACTION="/cgi-bin/sample.pl" METHOD="POST">
    <center>
        <input type="file" name="selectFile" />
    </center>
    <center>
        <input type="submit" value="send" name="B">
    </center>
</form>
#!/usr/bin/perl

use CGI qw(:standard);

$query = new CGI;

print "Content-Typr: text/plain\n\n";

$FileName = $query->param('selectFile'); #read the parameter passed from html page
有人能帮忙吗


谢谢

这里有一个关于如何在中上载文件的示例。您可以在那里找到所需的一切。

您的问题是什么?您拼写错误了
内容类型