在 PHP 中,为什么不写入 test.txt?

use*_*417 3 php file fwrite

我的代码是

<?php
$fp = fopen('test.txt', "a+");
fwrite($fp, 'Cats chase mice');
fclose($fp);
?>
Run Code Online (Sandbox Code Playgroud)

但 test.txt 仍然是空的。我没有看到任何错误,我不明白为什么它不写。

And*_*dén 5

在控制台中写这个

chmod a+w test.txt 
Run Code Online (Sandbox Code Playgroud)