• 20-01-2008, 02:35:43
    #1
    Onarcade de yeni sayfa eklediğimizde sayfa uzantısı örneğin page/1.html oluyor, bunun 1.html olan yerini nasıl örnek veriyorum oyunlar.html olarak değiştirebiliriz, yada sayfa başlığı nasılsı o şekil tarzında bişeyler?
    page.php aşağıdadır.. numerik olan yere bişey yazmamız gerekiyo sandığım kadarıyla ama ne :S

    <?php
     
    session_start();
    
    include ("includes/config.php");
    
    $page = $_GET[p];
    
    if (empty($page) || !is_numeric($page)) {
    	header("Location: ".$siteurl."/"); 
    	exit();
    }
    $page_result = mysql_query("SELECT * FROM pages WHERE pageid = '$page'");
    if (mysql_num_rows($page_result)) {
        $page_row = mysql_fetch_array($page_result);
    	$pageTitle = $page_row['title'];
    	$pageContent = $page_row['content'];
    	$pageKeywords = $page_row['keywords'];
    	$pageDescription = $page_row['description'];
    } else {
    	$pageTitle = "No Page";
    	$pageContent = "<center><b>No page</b></center>";
    	$pageKeywords = "no page";
    	$pageDescription = "No page";
    }
    
    $sitename2 = $sitename." - ".$pageTitle;
    $sitedescription = $pageDescription;
    $sitekeywords = $sitekeywords.", ".$pageKeywords;
    
    // Load template files
    include ("templates/".$template."/header.html");
    include ("templates/".$template."/page.html");
    include ("templates/".$template."/footer.html");
    ?>
  • 20-01-2008, 06:07:19
    #2
    istersen manuel yap. fazla sayfa oluÅŸturmayacaksan htaccess ile yap.
    htaccess dosyandaki kodların altına devam ettir.

    RewriteRule ^oyunlar.html page/1.html [L]
    RewriteRule ^oyunsuz.html page/2.html [L]
    RewriteRule ^oyuncaklar.html page/3.html [L]
  • 21-01-2008, 00:35:55
    #3
    Anladım manuel de çok bi sayfa yok eklenecek, cok tesekkur ederim, htacces in en altına ekliyorum.. ?