getOptions()); $db = Zend_Db::factory($c->profil->db->metier); Zend_Db_Table_Abstract::setDefaultAdapter($db); $fp = fopen('return.csv', 'w'); if (($handle = fopen('sfrFeuBicolore201511.csv', 'r')) !== false) { $row = 0; while (($data = fgetcsv($handle, 0, ",",'"')) !== false) { $row++; echo date('Y-m-d H:i:s')." - Ligne $row : "; //Set values from file $values = array(); $siren = $data[0]; echo $siren; $sfr = new SdMetier_Sfr_Scoring('1.3'); $sfr->evaluate($siren); $indicateur = $sfr->getIndicateur(); $po = $sfr->getPo(); $comment = $sfr->getComment(); fputcsv($fp, array($siren, $indicateur, $po, $comment), ',', '"'); echo "\n"; } } fclose($handle); fclose($fp);