我有这个表格:
<form method='post'>
<input name='i' type='hidden' value='' >
<input name='email' type='text' >
<input name='pass' type='password' >
<input type="submit" >
</form>
以及在 .txt 文件中打印数据的 PHP 代码:
<?php
$handle = fopen("data.txt", "a");
foreach($_POST as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>
结果是:
i = 值
email = 值
pass = 值
我不需要打印$_POST['i']值。
任何的想法?
qq_笑_17