提交post页面:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form action="upload.php" method="post">
<input type="text" name="name">
<input type="submit">
</form>
</body>
</html>
接收post页面:
<?php
var_dump($_POST);//post 是数组,不能用echo
return;
$filename = $_POST['name'];
if ($filename) {
file_put_contents("9.txt",$filename);
}
echo $filename;
?>