class= " lineNumbers " del
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
|
class= del
id= " codeSnippet812889 " class= " del $csv_directory = opendir (“admin/csvfiles/");
$number_of_files = 0;
Mientras que ($filename = readdir ($csv_directory)) {
¡Si ($filename! = “.” ¡&& $filename! = “.” ¡&& $filename! = “_vti_cnf”) {
$local_file = “admin/csvfiles/”. $filename;
$fp = fopen (“$local_file”, “r”);
mientras que ($data = fgetcsv ($fp, 1000, “, ")) {
$import= " PARTE MOVIBLE EN entregas VALORA ('', “$data [0]”, “$data [1]”, “$data [2]”, “$data [3]”, “$data [4]”, “$data [5]”, “$data [6]”, “$data [7]”, “$data [8]”, “$data [9]”, “$data [10]”, “$data [11]”, “$data [12]”, “$data [13]”, “$data [14]”, “$data [15]”, “$data [16]”, “$data [17]”, “$data [18]”, “$data [19]”, “$data [20]”, “$data [21]”, “$data [22]”, “$data [23] ") “;
el mysql_query ($import) o muere (el mysql_error ());
}
desatar ($local_file);
fclose ($fp);
$number_of_files++;
}
}
|