File Directory Php

     $fr = @fopen('data.txt', 'r');
     if(!$fr) {
          echo "Error! Couldn't open the file.
";
          exit;
     }
     while(!feof($fr)) {
          fscanf($fr, "%u-%u-%u %s %s", &$month, &$day,
                                        &$year, &$first, &$last);
          echo "First Name: $first
";
          echo "Last Name: $last
";
          echo "Birthday: $month/$day/$year
";
     }
     fclose($fr);
?>