如何从 ruby 调用 cgi 脚本
我有一个使用 SSL 托管在 Apache 上的远程 cgi 脚本。它接受两个输入变量 a
和 b
。
我想使用 ruby 调用具有正确输入变量的 cgi 脚本。
任何线索将不胜感激。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我有一个使用 SSL 托管在 Apache 上的远程 cgi 脚本。它接受两个输入变量 a
和 b
。
我想使用 ruby 调用具有正确输入变量的 cgi 脚本。
任何线索将不胜感激。
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
假设您想要通过 HTTP 远程调用 CGI 脚本,然后查看使用 Net::HTTP 加上 CGI.escape 对
a
和b
的值进行编码。 Net::HTTP 文档中有一些使用 GET 和 POST 执行此操作的示例。Assuming you mean that you want to make a remote call to the CGI script via HTTP then take a look at using Net::HTTP plus CGI.escape to encode the values of
a
andb
. There are some examples of doing this using GET and POST in the Net::HTTP documentation.