Created
August 8, 2019 01:48
-
-
Save parzibyte/d135d4bd095d953004e664c427dd84fa to your computer and use it in GitHub Desktop.
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
<?php | |
session_start(); | |
#Recuperar los mensajes de un archivo | |
$mensajes = []; | |
if(file_exists("mensajes.txt")){ | |
$mensajes = explode("\n", file_get_contents("mensajes.txt")); | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Tablero</title> | |
</head> | |
<body> | |
<h1>Hola <?php echo $_SESSION["usuario"]; ?></h1> | |
<a href="logout.php">Salir</a> | |
<a href="nuevo.html">Agregar mensaje</a> | |
<h3>Aquí están todos los mensajes del día:</h3> | |
<?php foreach ($mensajes as $mensaje) { | |
echo strip_tags($mensaje) . "<br>"; | |
} ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment