Re: fgets function for very large files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



in the following loop:

    $row = 1;
    while (($line = fgets($handle, 1024)) !== FALSE )
    {
        $line = str_replace(SEPARATOR, ",", $line);

        $data = explode(",", $line);

           $row++;
}

How put 1000 by 1000 lines of csv file to new ones?
and you know I think this works slowly
what do you recommend?

Thanks in advance,
shahrzad





>>
>>
> 1: http://php.net/fgetcsv
> 2: if( ($row % 10000) == 0 ) {
> 3: http://php.net/fputcsv
>
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux