Created
January 10, 2013 22:38
-
-
Save franzejr/4506445 to your computer and use it in GitHub Desktop.
Lendo linha por linha de um arquivo...
This file contains 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
$usuario_senha = file_get_contents("users.txt"); | |
$usuarios = array(); | |
//Lendo linha por linha para pegar os usuarios | |
foreach(preg_split("/((\r?\n)|(\r\n?))/", $usuario_senha) as $line){ | |
//echo $line."<br/>"; | |
$line_it = explode(":", $line); | |
$usuarios[$line_it[0]] = $line_it[1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment