0
申し訳ありませんが、この回答はたくさんありますが、私はすべての回答を試みました。 は私がウェブサイトを持っている(http://grmpixelmon.co/hwidreplace.html) 私はテキストファイルのテキストを置き換えるPHP
をしようとしたコードの入力にHWIDは、テキストファイル(HWIDs.txt) に交換するが、それはここで...私は500エラー与える を保つHWIDラベルがされています<?php
// See the password_hash() example to see where this came from.
$hwid = $_POST['hwid'];
$FILE = "HWIDs.txt";
$replace = $_POST['replace'];
$replace_with = " ";
$password = $_POST['password'];
$password2 = 'mypassword';
if ($password2 === $password) {
if (empty ($hwid)){
echo 'you did not enter an hwid';
}else{
file_put_contents("HWIDs.txt", $hwid, FILE_APPEND);
echo 'Succesfully added ';
echo $hwid;
echo ' as hwid';
}
$data = file_get_contents("HWIDs.txt");
$newdata = str_replace($replace, $replace_with, $data);
file_put_contents("HWIDs.txt", $newdata);
}
}
} else {
echo 'Invalid password.';
}
?>
中括弧が正しく一致していないように見えます - コードの全セクションですか? – RamRaider