如何在 CGI 脚本中调用另一个 Perl CGI 脚本?
我有一个 Perl CGI 脚本,它创建一个登录屏幕,即用户名和密码。
我希望在成功登录后,将用户重定向到应用程序中的下一个操作(另一个 Perl CGI 脚本)。
重定向 CGI 脚本或 HTML 页面的命令是什么?
I have a Perl CGI script that creates a login screen, i.e. user name and password.
I want, after successful login, the user to be redirected to the next action within the application (another Perl CGI script).
What is the command to redirect one CGI script or to an HTML page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 HTTP 术语中,您应该让程序输出 302 或 303 状态代码和位置标头。
如果您使用 CGI.pm 那么您可以使用重定向方法来实现此目的。
In HTTP terms you should have your program output a 302 or 303 status code and a Location header.
If you are using CGI.pm then you can use the redirect method to achieve this.
使用 CGI 作为 David Dorward 提到。
An example using CGI as David Dorward mentions.