我有以下HTTP数据:
POST /forum/post.php HTTP/1.1
Accept: text/xml, text/html, text/plain, */*
Host: myhost.com
Content-Length: 752
Cache-Control: no-cache
LxINAXyIgvOZQBF28yt0/NYmrYy7/dWENDNdFybIqYSWxLS6Ystk1pHfFDEBOJPgfJMWPQwqojMTvLugMOD7ZeXm33WYxFnjhR8C+Q8es49bGp8GiBmU7o3VYvJYKHSsknRXoB9tp9hhnzBJ4RMOhLbIIk5i6QwR8sFHxqUsL+i/8mKJDAcDsXXZcJXlXqhRN7fCDqLb/vTmnSTm+qA2HWU1AsBAGpWoQycRr0BT62lI2H3WnKevGi7fePJdCKWmwp5yoztKYCI3QJKrJbt5f60zb8TR5JHEs2S8ne0e6mssV7N4A3rwE+/O08pfHAmsVVtotpdqkPHWEWr+S7te9r01grfJt6GY0ozH0BPqSkP98wUwlrD385sRzf8M8uOw3hI1DWliZl0ea2Dc4b/7zVfwsqHl94Hk5x2p6nzXaW0vEsAVrodNIIcv3ZGGEkk97BOsHXP1rvJNiQLuM/7D3X9WFX/cYYqnNrIW84rhtbhty04r6JH37G9hPDlHjiYAogQ0lpMubsTNaW35Gn9G7X/qaH4+uQtYDVt67graNB3dDEBQRfXHw/sOM57hlxU/o/Q52RgAcekhGABXsLtXH3Sd5rurYg+qjMtceK9hC37ylXOJ+0bTKVf/A8nLlMarTtGhQK+oG8Rx8juy/USlCvg4++dCXS3qr0pFC9u2tcLAgND0g3tcBN1kYw2Ca4TTxP5m932pBTict7PE0jAXITmOoV3MGFE9AsKMJAVUdRK0sg==
如何捕获BASE64数据并将其写入文件,我试图转储$ _POST变量,但我什么都没得到,尝试使用$ _REQUEST或序列化($ _ REQUEST),我得到的只是:
Array
(
)
如何捕获未定义的帖子数据?谢谢!
答案 0 :(得分:3)
可以在$HTTP_RAW_POST_DATA
:
echo $HTTP_RAW_POST_DATA;
或者:
echo file_get_contents("php://input");
然后,您可以使用file_put_contents()
或任何其他方法将其写入文件以写入文件。