Created
March 1, 2023 19:35
-
-
Save kevinacuna1/f7395de59ae31a7b13fb11dd2bef0fc6 to your computer and use it in GitHub Desktop.
includes/
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 | |
| function debuguear($variable): string | |
| { | |
| echo "<pre>"; | |
| var_dump($variable); | |
| echo "</pre>"; | |
| exit; | |
| } | |
| // Escapa / Sanitizar el HTML | |
| function s($html): string | |
| { | |
| $s = htmlspecialchars($html); | |
| return $s; | |
| } | |
| /** Función que resiva que el usuario esté autenticado */ | |
| function isAuth(): void | |
| { | |
| if (!isset($_SESSION['login'])) { | |
| header('Location: /'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment