I am writing a small application to compare text files and email the comparison. My code works on linux without errors, but when running it on wamp, I get a parse error at the last line of the file. Is there something I'm missing here?
<?php
ini_set('display_errors',1);  
error_reporting(E_ALL & ~E_NOTICE);
$myDate = date('mdy');
$todayfile = "s".$myDate.".txt";
$to      = 'myemail@gmail.com';
$myfile = fopen("output"."$myDate", "w");
$listings = file('listings.txt', FILE_IGNORE_NEW_LINES);
$solditems = file("$todayfile", FILE_IGNORE_NEW_LINES);
if (file_exists("$todayfile")) {
    foreach ($listings as $listing){
    $founditems = preg_grep("/$listing/", $solditems);
            foreach ($founditems as $founditem){
            echo nl2br("\n$founditem");
            fwrite($myfile, "$founditem" . "\r\n");
    }
        }
            }
    $body = file_get_contents("c:\drs\".$myfile); 
    mail($to, 'test', $body);
else {
echo 'Day not closed or no items found';
}
?> 
Any help would be greatly appreciated.
 
    