如何处理html对PERL的POST请求 [英] How to handle POST request to PERL from html
本文介绍了如何处理html对PERL的POST请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个小的cPanel插件,该插件基本上是通过对perl文件的ajax请求将html表单提交给perl文件的.
I am writing a small cPanel plugin which basically submit an html form to a perl file over ajax request to the perl file.
请求的类型是POST,因为我需要向脚本发送一些数据.
The type of the request is POST as I need to send some data to the script.
我的问题是如何在perl中处理POST数据?
现在,我发现CGI库的实现很少,但是我没有将其用作默认的cPanel perl模块.此外,我发现LWP库的示例很少,但是我无法理解这些示例.有人可以给我任何建议吗?
Now, I have found few implementations with the CGI library, however I do not have that available as default cPanel perl module. Furthermore I have found few examples with the LWP library, however I am failing to understand those. Can someone give me any suggestion on this.
谢谢!
推荐答案
use CGI qw( );
my $cgi = CGI->new();
my $json = $cgi->param('POSTDATA');
这篇关于如何处理html对PERL的POST请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文