Correction chemin fichier

This commit is contained in:
Michael RICOIS 2012-01-27 16:58:59 +00:00
parent 6ddc67f012
commit 8503cc2d8f

View File

@ -238,6 +238,7 @@ $file = str_replace($extension, '', $file);
$path = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'path');
if (!file_exists($path->data.'/export')) mkdir($path->data.'/export');
$outFile = $path->data.'/export/'.$file.'-'.date('YmdHis').'.csv';
$inFile = $path->data.'/clients/'.$file.'.csv';
$profilM = new Application_Model_Profil($db);
$profil = $profilM->find($commande->idProfil)->current();
@ -256,7 +257,7 @@ $posKeySiren = $posKeySiret = $posKeyNic = false;
//Lire le fichier csv
$row = 0;
if (($handle = fopen($file, 'r')) !== FALSE) {
if (($handle = fopen($inFile, 'r')) !== FALSE) {
while (($data = fgetcsv($handle, 0, ',', '"')) !== FALSE) {
$num = count($data);