v2.5.2
Giriş yap

PHP Header Fonksiyonu Çalışmıyor

spleidanger
397 defa görüntülendi

Herkese merhaba xampp üzerinden çalışıyorum normalde yazılımı bitirdim cpanel kullandığım sunucuma yükledim fakat header("location:index.php");

header fonksiyonum çalışmıyor xampp üzerinde hiç bir sorun yok ama bazı serverlarda böyle yapıyor ob_start ve session_start mevcut çünkü üyelik sistemli

spleidanger
494 gün önce

index.php:

include 'inc/db.php';

if (empty($_SESSION['kullanici_giris']) {
    header("location:login");
    exit;
}

db.php:

session_start();
ob_start();
error_reporting(0);
date_default_timezone_set('Europe/Istanbul');

try 
{
	$db = new PDO("mysql:host=localhost;dbname=db_adi;charset=utf8",'db_kullanici','db_sifre');
	//echo "Veritabanı Bağlantısı Başarılı.";
} 
catch (PDOExpception $e) 
{
	echo $e->getMessage();
}