I'm trying to count the number of rows in a .csv file but giving error
Fatal error: Maximum execution time of 30 seconds exceeded in.
<?php
ini_set('max_execution_time', 300);
class Teste{
public function contarLinhas($arquivo){
$linhas = 0;
if($f = fopen($arquivo, "r" )){
while (!feof($f)) {
$linhas += 1;
}
}
return $linhas;
}
}
?>