gpt4 book ai didi

apache - Node.js 和 Apache ...如何在两者之间共享 POST 数据?

转载 作者:太空宇宙 更新时间:2023-11-04 01:12:02 24 4
gpt4 key购买 nike

假设我有一个登录表单 ->

<form action="$_SERVER["PHP_SELF"]" method="POST">
<input...>
<input...>
</form>

当将 PHP 与 Apache 结合使用时,我将通过以下变量获取 POST 数据:$_POST["example"]

但是,我想使用相同的 $_POST["example"] 来验证 Node.js 服务器上的用户。

因此用户不需要在表单中输入两次。

如何从 APACHE 获取 POST 数据到 Node.js 服务器?

最佳答案

您也可以使用 curl 或其中一个 HTTPClient 库将 POST 数据发送到您的 Node 应用程序。或者,您可以将 POST 数据写入 Node 进程输入流。

关于apache - Node.js 和 Apache ...如何在两者之间共享 POST 数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15858287/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com