How to count invalid rows in csv file using php?

This code is right or wrong tell me plzzz…
To display the contact & message, which i uploaded in csv file…

echo "<h2>" . "File " . $_FILES['file']['name'] . " Uploaded Successfully." . "</h2>";
echo "<h3>Displaying Contents:</h3>";
readfile($_FILES['file']['tmp_name']);