语法错误,意外'fwrite'(T_STRING)

Mar*_*Ang -2 php fwrite

有人可以检查我的代码,我不知道它有什么问题.每当我执行代码时,我都会在标题中得到错误.

<?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);

?>
Run Code Online (Sandbox Code Playgroud)

rek*_*ire 5

你忘记了; 就在这一行之后:

$text = "Here are more text lines to insert."
Run Code Online (Sandbox Code Playgroud)

这将解决您的问题.