通常我用它来向页面添加内容。 它的工作原理
<?php
$file = 'newpage.html';
$current = file_get_contents($file);
$current .= $_POST["thing"];
file_put_contents($file, $current);
?>
有没有办法直接写入指定的div或其他东西, 因为某些参数永远不会改变,如TITLE PAGE和其他一些参数, 我只想更新div。
<html dir="ltr" lang="IT-IT">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>Things For Coins
</title>
</head>
<body>
<div id="I want add content here">
</div>
<div id="and here">
</div>
</body>
</html>