Permission declined to write to file

On xamppp I have в php рукописный шрифт that writes some восходит that is posted to it, over в text file. But when I try an run it I get

php рукописный шрифт:

<?php
$file = 'xy.txt';
// Opens the file to load the current content
$current = file_get_contents($file);
// Adds the data
$current .= "Hello\n";
// Writes the content back to the file
file_put_contents($file, $current);
?>
0
задан 2 January 2016 в 21:39

2 ответа

Проблема состоит в том, что файл xy.txt не перезаписываем процессом, который выполняет Сценарий PHP.

1
ответ дан 29 September 2019 в 17:31

Необходимо открыть оболочку и сделать следующее:

  1. cd /opt/lampp/htdocs
  2. sudo chown -R :www-data .
  3. sudo chmod -R 664 .

, Который должен зафиксировать его.

0
ответ дан 29 September 2019 в 17:31

Другие вопросы по тегам:

Похожие вопросы: