使用php://input
2012-07-09 10:43
169 查看
就是一个输入流, 可以获得POST的原始数据.
echo file_get_contents("php://input");
//示例代码
//test.html
<html>
<head>
<!--set title-->
<title> test php://input </title>
</head>
<!--show page-->
<body>
<form action = "input.php" method="post">
用户名: <input type="text" name="user"> <br>
密码:<input type="password" name="password"> <br>
<input type="submit">
</form>
</body>
</html>
echo file_get_contents("php://input");
//示例代码
//test.html
<html>
<head>
<!--set title-->
<title> test php://input </title>
</head>
<!--show page-->
<body>
<form action = "input.php" method="post">
用户名: <input type="text" name="user"> <br>
密码:<input type="password" name="password"> <br>
<input type="submit">
</form>
</body>
</html>
<html> <head> <!--set title--> <title> test php://iput web </title> </head> <!--show page--> <body> <?php echo"post data: <br>/n"; echofile_get_contents("php://input"); ?> </body> </html> <html> <head> <!--set title--> <title> test php://iput web </title> </head> <!--show page--> <body> <?php echo "post data: <br>/n"; echo file_get_contents("php://input"); ?> </body> </html>
相关文章推荐
- file_get_contents("php://input")的使用方法
- file_get_contents("php://input")的使用方法
- 使用php://input接收手机图片上传二进制流
- file_get_contents("php://input")的使用方法
- php输入流php://input使用浅析
- file_get_contents("php://input")的使用方法
- php输入流php://input使用浅析
- 使用php://input接收数据流(还有多个参数的解决办法)
- PHP代码中input控件使用id无法POST传值,使用name就可以
- file_get_contents("php://input")的使用方法
- file_get_contents("php://input")的使用方法
- file_get_contents("php://input")的使用方法
- file_get_contents("php://input")的使用方法
- file_get_contents("php://input")的使用方法
- 使用php://input接收数据流(还有多个参数的解决办法)
- 摄像头拍照,PHP输入流php://input的使用分析
- file_get_contents("php://input")的使用方法
- file_get_contents("php://input")的使用方法
- 使用phpstorm时,打开php页面,提示No input file specified。
- file_get_contents("php://input")的使用方法