Logout.php no funciona si no das refresh manualmente


#1

Ahora si que tengo un grabe problema que no puedo solucionar solo yo
se trata del logout.php que cuando se desloguea el unico problema sale pagina en blanco o dice operacion incorrecta
¿Cual es el problema?

<?php @session_start(); include('acceso_db.php'); if(isset($_SESSION['usuario_nombre'])) { session_destroy(); header("Location: acceso.php"); }else { echo "Operacion incorrecta."; } ?>

#2

@supertcriss Login to your 000webhost account >> Setting >> General >> and change php version to 5.6 and then try again.

If you’re still facing the same the paste below piece of code in your .htaccess file and then try again.
php_flag output_buffering on


#3

thanks, it worked
when logout redirects me to login
how it had to be, thank you very much


#4

You mean you need to redirect to login page after logout.

If so, add this in the end
header(location:index.php);

Replace “index.php” with the file/path you want to redirect after logout.