脚本调用CGI [英] Script calling CGI

查看:83
本文介绍了脚本调用CGI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我需要将一些参数从Perl程序发送到另一个在cgi-bin中的Perl程序。我正在尝试做一个http请求,但是它运行不正常。任何想法?


Palm。

Hi There,
I need to send some parameters from a Perl program to another Perl program that''s in cgi-bin. I''m trying to do an http request, but it''s not working properly. Any ideas?

Palm.

推荐答案

没有看到你的代码或解释什么不能正常工作没有想法。意思是。
No ideas without seeing your code or explaining what "not working properly" means.


你好,

我在unix目录下有一个名为send.pl的perl程序(在/ usr / main / laal / work中)和另一个名为receive.pl的perl程序在web服务器上(在/ usr / docs / www / cgi-bin中)。我需要从send.pl发送一些值到receive.pl。我喜欢使用http请求来调用receive.pl并发送如下值:


http://abcd.com/cgi-bin/receive.pl?total=789456& ; name = jack& computer = desktop


我是新程序员,我不知道如何创建http请求并将值发送到其他程序。请问有谁请帮帮我吗?


谢谢。


Palm。
Hi there,
I''ve a perl program called send.pl in a unix directory (in /usr/main/laal/work) and another perl program called receive.pl on the web server (in /usr/docs/www/cgi-bin). I need to send some values from send.pl to receive.pl. I like to use http request to call receive.pl and send the values something like this:

http://abcd.com/cgi-bin/receive.pl?total=789456&name=jack&computer=desktop

I''m a new programmer and I''ve no idea about how to create http request and send the values to the other program. Could any one please help me out?

Thank You.

Palm.


Hello palm ,


更清楚。


好​​吧,听起来你所需要的就是对LWP的介绍。这是一组通常用于处理网页的cpan模块。你可以用它们做很多事情,所以花点时间在某个时刻浏览包中的所有其他模块。但就目前而言,我只想指出你:

cpan LWP ::简单


如果您在安装此模块时需要帮助,请查看cpanfaq。

cpanfaq如何安装perl模块


- 米勒
Hello palm,

That was much more clear.

Ok, it sounds like all you need is an introduction to LWP. This is a set of cpan modules typically used to process web pages. You can do a lot of things with them, so take a moment to browse around all the other modules in the package at some point. But for now, I would simply point you to this:

cpan LWP::Simple

If you need help installing this module, look at cpanfaq.

cpanfaq How to install perl modules

- Miller


这篇关于脚本调用CGI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆