三个php问题
<html>
<head> <title>输入框测试</title>
</head>
<body>
<form action="./ly.php" method="post" >
姓名: <input type="text" name="name" />
年龄: <input type="text" name="age" />
<input type="submit" value="我要提交" / </form>
//输入框。
<?php $name=$_POST['name'];
$age=$_POST['age'];
$info="<hr/>你的名字为:
$name
\n你的年龄为:
$age<hr/>\n";
echo $info;
file_put_contents("ly_log.txt",$info,FILE_APPEND); ?>
</body> </html>
//我用uc测试会乱码
//当输入
是会有换行出现。
怎么解决?
//这样写换行的输入框
,解决乱码,而且你的变量要加.连接符