示例PHP脚本

<?php
$fp = fopen("printpost.txt", 'w');

echo "<B>GET data ...</B><BR>&nbsp;&nbsp;&nbsp;&nbsp;";
print_r($_GET);
echo "<BR><BR>";

fputs($fp, "GET data ...\r\n");
foreach ($_GET as $key => $value)
fputs($fp, "\t$key = $value\r\n");
fputs($fp, "\r\n");

echo "<B>POST data ...</B><BR>&nbsp;&nbsp;&nbsp;&nbsp;";
print_r($_POST);
echo "<BR><BR>";

fputs($fp, "POST data ...\r\n");
foreach ($_POST as $key => $value)
fputs($fp, "\t$key = $value\r\n");

fclose($fp);

echo "<a href='printpost.txt'>view file</a>";

die();
?>

技术支持 | 关于 Trivantis
© 版权 Trivantis 2017