Created
March 4, 2013 16:13
-
-
Save dodopok/5083367 to your computer and use it in GitHub Desktop.
Ler arquivo linha por linha
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$arquivo = fopen('testes.txt', 'r'); | |
if(!$arquivo){ | |
echo 'Não foi possível abrir o arquivo'; | |
} | |
else{ | |
while(!feof($arquivo)){ | |
$linha = fgets($arquivo); | |
echo rtrim($linha) . "<br>"; | |
} | |
fclose($arquivo); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment