<?phpheader("Content-type: text/html; charset=utf-8");
require('conn.php');
$id = intval($_GET['id']);
$sql = "delete from lyb where ID = $id";if ($mysqli->query($sql) === true) { echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
echo "<script charset='utf-8' type='text/javascript'>alert('刪除成功');location.href='5-6.php';</script>";
} else { echo "刪除失敗" . $mysqli->error; echo "<script>location.href='5-6.php'</script>";
}
$mysqli->close();?>為何刪除成功幾個字,還是顯示為亂碼?
為何這個alert出來的刪除成功,還是亂碼?
白板的微信
2018-08-18 20:02:07