I am using fgetcsv function to import csv files in my application, and it works fine. But, if i try to import a file saved on mac computer to a windows computer, i am unable to do so, but, however, if i open the same file in windows and save it again, it gets imported successfully.
When turned on, PHP will examine the data read by fgets() and file() to see if it is using Unix, MS-Dos or Macintosh line-ending conventions.
This enables PHP to interoperate with Macintosh systems, but defaults to Off, as there is a very small performance penalty when detecting the EOL conventions for the first line, and also because people using carriage-returns as item separators under Unix systems would experience non-backwards-compatible behaviour.