I have the following code in php
<?php
function logs($texto){
date_default_timezone_set('America/Sao_Paulo');
$hora = date("H:i:s");
$data = date("d-m-Y");
$log = fopen("log/".$data.".txt","a+");
$escreve = fwrite($log,$hora." - ".$texto. "\r\n");
fclose($log);
}
?>
I tested it in windows environment, it works perfectly, however when I move to linux, the same thing to save the logs, it does not even create the document. Do you have to have some permission to do so?