-1

有人可以检查我的代码,我不知道它有什么问题。每当我执行代码时,标题中都会出现该错误。

<?php
$file = "newfile.txt";

$text = "This is a text line. ";

$handle = fopen($file, "w");

fwrite($handle, $text);
fclose($handle);

$handle = fopen($file, "a");

$text = "Here are more text lines to insert."
fwrite($handle, $text);
fclose($handle);

include ($file);

?>
4

1 回答 1

6

你忘了一个;在这一行之后:

$text = "Here are more text lines to insert."

这将解决您的问题。

于 2012-11-15T04:54:23.060 回答