ID: 26510 User updated by: thomas303 at web dot de Reported By: thomas303 at web dot de Status: Open Bug Type: Filesystem function related Operating System: Suse Linux 8.2 PHP Version: 4.3.5-dev New Comment:
Hi iliaa, one thing, I did was to do a count on the array of fgetcsv. In result it was alwas 18 values per line, so there is less data returned than data existing in the file, i think. best regards thomas Previous Comments: ------------------------------------------------------------------------ [2003-12-03 15:56:51] thomas303 at web dot de Hi iliaa, I did some find/replace and can now provide the file. I already tested with the script and the result is the same. I'll send you the file via email. Hope that's possible. best regards thomas ------------------------------------------------------------------------ [2003-12-03 15:37:44] [EMAIL PROTECTED] fgetcvs() can support multi-line rows, which may explain why a file with X number of lines when read with fgetcvs() would return less lines (but equal amount of total data). If you cannot provide the original cvs file, could you provide an equivalent that can replicate the problem. Without a cvs file it's nearly impossible for us to resolve this problem. ------------------------------------------------------------------------ [2003-12-03 15:24:40] thomas303 at web dot de Hi, me again... in case I consider it correctly, fgetcsv is sometimes - reading and processing a line, and twice jumping to the next line - or ignoring one line and processing the next one. best regards thomas ------------------------------------------------------------------------ [2003-12-03 15:19:27] thomas303 at web dot de Hi, using fget and explode (like written in the script above) $zaehler returns 20967. Using fgetcsv it returns 17861 reading the same file. I am really sorry, I can't provide the file. Best regards Thomas ------------------------------------------------------------------------ [2003-12-03 15:15:57] thomas303 at web dot de #!/usr/local/bin/php <?php $file_name="pks.dat"; $fp=fopen($file_name,"r"); while(feof($fp)===False) { // The comment-lines should work instead of fgetcsv. // $new = fgets($fp,4096); // $new_field_values=explode("|",$new); $new_field_values=fgetcsv($fp,4096,"|"); $zaehler++; } fclose ($fp); print $zaehler."\n"; ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26510 -- Edit this bug report at http://bugs.php.net/?id=26510&edit=1