Last active
September 7, 2023 21:07
-
-
Save fedealvz/21404a6c6ba3efe7635c0ff85921b43d to your computer and use it in GitHub Desktop.
Prueba de sesiones #session #PHP
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 | |
// Más información: https://help.wnpower.com/hc/es/articles/19296028017677 | |
// Forzar mostrar errores en pantalla | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
session_start(); | |
if (isset($_SESSION['PRUEBA'])) { | |
$valor=$_SESSION['PRUEBA']; | |
echo "<br>Session ID: ".session_id(); | |
echo "<br>Valor de la variable guardada en la Session: ".$valor; | |
} else { | |
echo "<br>Session no disponible. Haz <a href='?reload=true'>reload</a> para iniciar el testeo."; | |
$_SESSION['PRUEBA']="Hola Mundo!"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment