Forum Moderators: coopster
I figure if I can just read the first couple lines in, I could easily do a preg_match for \r, \r\n, or \n.
I have auto_detect_line_endings enabled, and it works for fgetcsv, but I need to explicitly know what it ends in. I'm generating LOAD DATA INFILE LINES TERMINATED BY '?' for mysql.
I'm not sure how I can detect the line endings. PHP only lets me read line by line, or needs to load the entire file, and these files are multi-gig files so that's not an option.
Ideas?
Thanks