一个关于PHP的问题
  • 板块学术版
  • 楼主chenkuo
  • 当前回复1
  • 已保存回复1
  • 发布时间2023/2/12 07:56
  • 上次更新2023/10/24 01:02:34
查看原帖
一个关于PHP的问题
443023
chenkuo楼主2023/2/12 07:56

有没有大佬帮我看看这段代码有没有语法错误呢?

<html>
<head>
<meta charset=utf-8>
</head>
<body>
<?php
$ck=$_POST["name"];
echo $ck;
$aaa=",欢迎您!";
echo $aaa;
echo "<br>";
$asd=fopen("test.txt", "r");
for($i=1;! feof($asd);$i++){
echo fgets($fp). "<br />";
}
fclose($asd);
?>
<form>
<input type="text" name="word" value="这里输入您想说的内容" size="40" />
<input type="submit">
</form>
<?php
$showtime=date("Y-m-d H:i:s");
$qwe=$_POST["word"];
$sss=fopen("test.txt","a+");
fwrite($sss,$ck." ".$showtime." :".$qwe."<br>");
fclose($sss);
?>
</body>
</html>
2023/2/12 07:56
加载中...