Controle existence fichier

This commit is contained in:
Michael RICOIS 2016-07-28 17:23:06 +02:00
parent d8b364e6c3
commit b56a55c1d0

View File

@ -159,6 +159,10 @@ foreach ( $dataProfil as $item ) {
$outFile = $profil->login.'_'.$id.'_'.date('YmdHis').'.csv';
$fp = fopen($path.'/'.$outFile, 'w');
if ($fp === false) {
echo "Error ".$path."/".$outFile."\n"; exit;
}
// --- Ecrire l'entete
if ( count($tabEnteteLabel) > 0 ) {
fputcsv($fp, $tabEnteteLabel, ',', '"');