Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 110... Línea 110...
110
    $fatal_error = false;
110
    $fatal_error = false;
111
    $errormessage = '';
111
    $errormessage = '';
Línea 112... Línea 112...
112
 
112
 
113
    // data should be separated by a ';'.  *NOT* by a comma!  TODO: version 2.0
113
    // data should be separated by a ';'.  *NOT* by a comma!  TODO: version 2.0
114
    // or whenever we can depend on PHP5, set the second parameter (8192) to 0 (unlimited line length) : the database can store over 128k per line.
114
    // or whenever we can depend on PHP5, set the second parameter (8192) to 0 (unlimited line length) : the database can store over 128k per line.
115
    while ( $csv_data = fgetcsv($handle, 8192, ';', '"')) { // if the line is over 8k, it won't work...
115
    while ( $csv_data = fgetcsv($handle, 8192, ';', '"', '\\')) { // if the line is over 8k, it won't work...
Línea 116... Línea 116...
116
        $line++;
116
        $line++;
117
 
117
 
118
        // be tolerant on input, as fgetcsv returns "an array comprising a single null field" on blank lines
118
        // be tolerant on input, as fgetcsv returns "an array comprising a single null field" on blank lines