and tried to write a csv file with php, somehow you are not writing anything and I would like to know what it could be, if I recommend a php editor for linux, because I'm working with the nano editor from the console, the code is
<?php
date_default_timezone_set('UTC');
$fechaSolicitacion = date('Y-m-d H:i:s');
$nombreEvento = $_POST["nombreEvento"];
$Solicitante = $_POST["Solicitante"];
$emailSolicitante = $_POST["emailSolicitante"];
$servicio = $_POST["servicio"];
$fechaEvento =$_POST["fechaEvento"];
$horaFin = $_POST["horaFin"];
$horaInicio = $_POST["horaInicio"];
$organiza = $_POST["organiza"];
$nombreResponsable = $_POST["nombreResponsable"];
$cargo = $_POST["cargo"];
$telefono = $_POST["telefono"];
$celular = $_POST["celular"];
$responsableTecnico = $_POST["responsableTecnico"];
$emailTecnico = $_POST["emailTecnico"];
$iniciohora = (int) substr($horaInicio, 0, 2);
$finhora = (int) substr($horaFin, 0, 2);
$iniciominutos = (int) substr($horaInicio, 3, 4);
$finminutos = (int) substr($horaFin, 3, 4);
$minutos = $finminutos - $iniciominutos;
if ($minutos < 0){
$minutos = $minutos*(-1);
}
$duracion = ($finhora - $iniciohora)*60 + $minutos;
echo $duracion . '<br \>';
$iniciohora = $iniciohora + 5;
$hora = $fechaEvento . " " . $iniciohora . ":" . $iniciominutos;
echo "hora: " . $hora. '<br \>';
$hora = strtotime($hora);
$hora = gmdate("Y M d H:i:s T", $hora);
$fechaSolicitacion = strtotime($fechaSolicitacion);
$fechaSolicitacion = gmdate("Y M d H:i:s T", $fechaSolicitacion);
$csv_line = array($nombreEvento, $Solicitante, $emailSolicitante, $servicio,
$fechaEvento, $horazoom, $duracion, $organiza, $nombreResponsable, $cargo,
$telefono, $celular, $responsableTecnico, $emailTecnico);
$path = 'reuniones.csv';
$fop = fopen($path, 'w');
foreach ($csv_line as $line){
fputcsv($fop, $line);
}
rewind($fop);
fclose($fop);
?>
all files are and exist in / var / www / html the php is executed from an html, I know that I collect the data from the html form. the operating system is ubuntu.