merhaba ben sadece benim kod çalışmıyor neden anlamıyorum. benim site için yahoo sunucusu kullanıyorum.
Bu. Benim çıkış kodu (başarıyla localhost üzerinde çalışacak olan) ama çevrimiçi bu kodu upload zaman sonra onun işe yaramaz. plz yardım
<?php
//logout code
include("../Config.php");
if (!isset ($_SESSION['username']))
{
header( 'HTTP/1.1 301 Moved Permanently' );
header('Location: ../index.php');
if (!headers_sent())
{
header('Location: http://www.mysite.com/index.php');
exit;
}
}
else
{
$_SESSION = array();
session_destroy();
session_unset();
header( 'HTTP/1.1 301 Moved Permanently' );
header('Location: ../index.php');
if (!headers_sent())
{
header('Location: http://www.mysite.com/index.php');
exit;
}
}
?>
config.php dosyası oturum kodu içeren (gibi oturumu başlatın)