https post 是如何工作的以及 php 如何获取 https post 变量
刚刚闲逛,https是如何工作的?另外php如何获取https post?它就像 php 中的普通 get post 一样工作吗?
示例: 如果有一个系统有一个 https post 到 websiet test.php ,我可以通过在 test.php 下使用 $_POST 来获取该帖子吗?
Just wandering, how is https works? Also how is php able to get the https post? Is it just works like the normal get post in php??
Exmaple:
If there have a system having a https post to a websiet test.php , can I just get the post by using $_POST under test.php?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,解密是由服务器的 ssl 层自动完成的。
Yes, the decryption is done by the server's ssl layer automatically.
是的。 Php 不处理 HTTP bs HTTPS。阿帕奇确实如此。 PHP 的行为相同。所以回答你的问题 - 是的
Yeah. Php doesn't handle the HTTP bs HTTPS. apache does. PHP behaves the same. So to answer your question - yes
一旦您的服务器设置为处理 https,它对于在您的服务器上运行的应用程序来说几乎是透明的。一切工作方式都与 HTTP 相同,只是 URL 方案和端口不同。
Once your server is set up to handle https it's pretty much transparent to apps running on your server. Everything works the same way as HTTP, except the URL scheme and port will be different.
以后请自己再读一遍,尽量把问题弄得更清楚。
有关 HTTPS 的信息,为什么不先查看维基百科(或任何其他来源)?
http://en.wikipedia.org/wiki/HTTPS
HTTPS 加密客户端和服务器之间的通信。
抽象掉它,你仍然可以使用 HTTP。因此,PHP 甚至不知道它是通过 HTTPS 进行通信的(除了协议、url 等,它可能会要求/检查。但在使用它时您不需要记住任何内容)
所以是的,$_POST 仅适用于 HTTPS就像 HTTP 一样。
Please try to make questions more clear in the future, reading them yourself again.
For information on HTTPS, why not check wikipedia (or any other source) first?
http://en.wikipedia.org/wiki/HTTPS
HTTPS encrypts the communication between client and server.
Abstract that away and you still have HTTP. Thus, PHP will not even know it was HTTPS that was communicated over (other than protocol, url etc it may ask/check for. but nothing you need to keep in mind when working with it)
So yes, $_POST works with HTTPS just like with HTTP.