Hello what happens is that the server I work with is the version of php 5.3.3 and because for bigger issues we can not simply update the php, and the code that I use to perform an insertion in the database uses the function yield
and only available from 5.5, how can I replace it?
function filedata(){
$central = 'AVC05';
$file = fopen("data_centrales/datos_".$central.".log", "r");
if(!$file){
echo "No se pudo abrir el archivo";
} else {
while(($line = fgets($file)) !== false){
yield $line;
}
}
}