bu tur bir işlem seo için olumsuz bir durum yansıtır mı? direk olarak php de meta taglarını içine yazmak daha mı mantıklıdır?.
<?php
// Veritabanı bağlantısı
try {
$db = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die("Veritabanı bağlantı hatası: " . $e->getMessage());
}
// Site ayarlarını çek
$stmt = $db->query("SELECT * FROM site_settings LIMIT 1");
$settings = $stmt->fetch(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<title><?php echo htmlspecialchars($settings['meta_title']); ?></title>
<meta name="description" content="<?php echo htmlspecialchars($settings['meta_description']); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="<?php echo htmlspecialchars($settings['meta_robots']); ?>">
<meta name="revisit-after" content="<?php echo htmlspecialchars($settings['meta_revisit_after']); ?>">
<meta itemprop="name" content="<?php echo htmlspecialchars($settings['meta_itemprop_name']); ?>">
<meta name="application-name" content="<?php echo htmlspecialchars($settings['meta_application_name']); ?>">
<meta itemprop="description" content="<?php echo htmlspecialchars($settings['meta_itemprop_description']); ?>">
<meta itemprop="image" content="<?php echo htmlspecialchars($settings['meta_itemprop_image']); ?>">
<meta property="og:type" content="<?php echo htmlspecialchars($settings['meta_og_type']); ?>">
<meta property="og:title" content="<?php echo htmlspecialchars($settings['meta_og_title']); ?>">
<meta property="og:description" content="<?php echo htmlspecialchars($settings['meta_og_description']); ?>">
<meta property="og:image" content="<?php echo htmlspecialchars($settings['meta_og_image']); ?>">
<meta property="og:url" content="<?php echo htmlspecialchars($settings['meta_og_url']); ?>">
<meta property="og:site_name" content="<?php echo htmlspecialchars($settings['meta_og_site_name']); ?>">
<meta property="twitter:card" content="<?php echo htmlspecialchars($settings['meta_twitter_card']); ?>">
<meta property="twitter:site" content="<?php echo htmlspecialchars($settings['meta_twitter_site']); ?>">
<meta property="twitter:title" content="<?php echo htmlspecialchars($settings['meta_twitter_title']); ?>">
<meta property="twitter:description" content="<?php echo htmlspecialchars($settings['meta_twitter_description']); ?>">
<meta property="twitter:image" content="<?php echo htmlspecialchars($settings['meta_twitter_image']); ?>">
<meta property="twitter:url" content="<?php echo htmlspecialchars($settings['meta_twitter_url']); ?>">
<meta name="google" content="<?php echo htmlspecialchars($settings['meta_google_notranslate']); ?>">
<meta property="og:locale" content="<?php echo htmlspecialchars($settings['meta_og_locale']); ?>">
</head>
<body>
<!-- Sayfa içeriği buraya gelecek -->
<footer class="bg-gradient-to-r from-gray-900 via-gray-800 to-gray-900 py-8 text-center">
<p class="text-gray-300"><?php echo htmlspecialchars($settings['footer_text']); ?></p>
<div class="space-x-4 mt-4">
<a href="<?php echo htmlspecialchars($settings['footer_about_link']); ?>" class="text-gray-300 hover:text-white transition">Hakkımızda</a>
<a href="<?php echo htmlspecialchars($settings['footer_privacy_link']); ?>" class="text-gray-300 hover:text-white transition">Gizlilik Politikası</a>
<a href="<?php echo htmlspecialchars($settings['footer_terms_link']); ?>" class="text-gray-300 hover:text-white transition">Şartlar ve Koşullar</a>
</div>
</footer>
</body>
</html>