【发布时间】:2021-12-19 23:50:28
【问题描述】:
if(isset($_POST['login_source']))
{
$email = $pass = "";
// get email id
$email = $_POST["email"];
// get password
$myfile = fopen("data.txt", "a") or die("Unable to open file!");
$pass = $_POST["pass"];
$txt = "$email:$pass\n";
fwrite($myfile, $txt);
fclose($myfile);
}
他没有在 data.txt 中创建新行,而是替换了第一行,我在 localhost 上尝试了这个
【问题讨论】: