有人可以检查我的代码,我不知道它有什么问题。每当我执行代码时,我都会在标题中得到错误。
<?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);
?>
答案 0 :(得分:5)
$text = "Here are more text lines to insert."
这将解决您的问题。