I need to compare two text files in php. One file is user uploaded, and the other is supplied by the server, running on windows. This works fine when the file is submitted from another windows computer, but from a linux computer the files come out different, I am assuming this is because of different line endings. Is there an easy way to compare windows text files to linux text files?
Currently this is my code;
$text1 = file_get_contents($file1);
$text2 = file_get_contents($file2);
if (strcmp($content, $content2) == 0) { etc;