echo kısmını şununla değiştirin:
$resim = $cikti["avatar"];
$boyut = filesize($resim);
header("Content-Type: image/png");
header("Content-length: {$boyut}");
readfile($resim);
exit;
Site beyaz ekranda kaldı hocam bu seferde, yanlış mı yerleştirdim acaba?
TAM KOD : <?php
try {
$baglanti = new PDO("mysql:host=localhost;dbname=SANSÜR", "SANSÜR", "SANSÜR");
$baglanti->exec("SET NAMES utf8");
$baglanti->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sorgu = $baglanti->query("SELECT * FROM users WHERE username = '".htmlspecialchars($_GET["username"])."'");
$cikti = $sorgu->fetch(PDO::FETCH_ASSOC);
$resim = $cikti["avatar"];
$boyut = filesize($resim);
header("Content-Type: image/png");
header("Content-length: {$boyut}");
readfile($resim);
exit;
} catch (PDOException $e) {
die($e->getMessage());
}
$baglanti = null;
?>