使用php://input

来源:互联网 发布:淘宝店铺授权书 编辑:程序博客网 时间:2024/05/19 22:58

php:// — 存取各种各样的输入/输出流(Accessing various I/O streams).

php://input allows you to read raw data from the request body. In case of POST requests, it preferrable to $HTTP_RAW_POST_DATA as it does not depend on special php.ini directives. Moreover, for those cases where $HTTP_RAW_POST_DATA is not populated by default, it is a potentially less memory intensive alternative to activating always_populate_raw_post_data. php://input is not available with enctype="multipart/form-data"

php://input 允许你从请求页面中读取原生数据。在使用POST请求状态下,它比$HTTP_RAW_POST_DATA更易于使用,因为它不依靠特殊的php.ini指令。php://input对于 enctype="multipart/form-data" 表单数据不可用。

php://output allows you to write to the output buffer mechanism in the same way as print() and echo().

php://output允许你如同用print()和echo()方法一样,向输出缓冲区写入数据。

post_data.html

 

getData.php

 

如果你输入的user name:test,pass word:123456,返回的即是值对数据:userName=test&passWord=123456

 

把php://input的所有数据存入a.txt怎么做?

 

原创粉丝点击