php中file_get_contents怎么用

2023-05-21,

这篇文章主要介绍php中file_get_contents怎么用,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!


index.html

复制代码 代码如下:

  <form action="action.php" method="post" >
  <input type="text" name="userName"  id="userName" /><br/>
  <input type="text" name="userPass"  id="userPass" /><br/>
  <input type="submit" value="ok" />
 </form>

action.php

复制代码 代码如下:

<?php
$raw_post_data = file_get_contents('php://input', 'r');
echo "-------\$_POST------------------<br/>";
echo var_dump($_POST) . "<br/>";
echo "-------php://input-------------<br/>";
echo $raw_post_data . "<br/>";
?>

 

以上是“php中file_get_contents怎么用”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注本站行业资讯频道!

《php中file_get_contents怎么用.doc》

下载本文的Word格式文档,以方便收藏与打印。