PHP - File Handling
Identify the error in this PHP code snippet for reading a CSV file:
$file = fopen('file.csv', 'r');
while ($line = fgets($file)) {
$data = fgetcsv($line);
print_r($data);
}
fclose($file);