Advertisement
garfield

[PHP]: Contar linhas de arquivo

Feb 4th, 2012
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. /*
  2.             @Função: Contar quantas linhas tem em um arquivo de texto
  3.             @Créditos: SuYaNw Dácio
  4.  
  5.             http://suyanwdacio.blogspot.com/
  6. */
  7.  
  8. function ContarLinhas($arquivo)
  9. {
  10.     $file = 0;
  11.     if(file_exists($arquivo))$file = count(file($arquivo));
  12.     return $file;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement