Browse Source

eviter un warning sur un fichier inexistant

svn/attic/spip-bonux-3/118152
cedric@yterium.com 10 years ago
parent
commit
b4d968d212
  1. 4
      inc/importer_csv.php

4
inc/importer_csv.php

@ -67,8 +67,8 @@ function importer_csv_nettoie_key($key){
*/
function inc_importer_csv_dist($file, $head = false, $delim = ",", $enclos = '"', $len = 10000) {
$return = false;
$handle = fopen($file, "r");
if ($handle){
if (@file_exists($file)
AND $handle = fopen($file, "r")){
if ($head) {
$header = fgetcsv($handle, $len, $delim, $enclos);
if ($header){

Loading…
Cancel
Save