filesize of function.fgetcsv.php

Posted on 2008-11-04
Last Modified: 2013-12-13
I really would like to use the fgetcsv function in a php application. The thing is that my csv file contains 6 million unique codes and has a 36 Mb filesize. Does fgetcsv handles files this big? Or is there a better solution?

Question by:wal_toor
    LVL 6

    Accepted Solution

    I'm fairly certain that this function will open that CSV file fine. I don't think there is a specific limit on the file size.

    If you're unsure, check this link out. It explains the function well:
    LVL 6

    Expert Comment

    No problems. Just don't read it all in one statement, but parse it line by line (as fgetcsv is supposed to work).
    LVL 8

    Author Comment

    Hello all,

    I have tried this solution, it works. After doing some searching there was even a faster solution: using LOAD DATA LOCAL INFILE 1.3 million records within a few seconds... amazing.

    Thanks for your comment.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now