• 24-09-2010, 23:20:22
    #1
    merhaba arkadaşlar aşağıdaki kodlarda oyun adını titleye yazdırmaya çalıştım ama olmadı

    kodlar:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <body>
    <center>
    <table width="100%" border="0">
      <tr>
        <td>
    <?php
    
    include ("includes/config.php");
    
    $fileid = $_GET['fileid'];
    if (is_numeric($fileid)) {
        $sql = mysql_query("SELECT * FROM files WHERE fileid = '$fileid' LIMIT 1");
        
        if (mysql_num_rows($sql) > 0) {
        while($row = mysql_fetch_assoc($sql)){
        
        $fileid = $row['fileid'];
        $filename = $row['file'];
        $icon = $row['icon'];
        $filelocation = $row['filelocation'];
        $iconlocation = $row['iconlocation'];
        $filetitle2 = $row['title'];
        $filetitle = $row['title'].", ".$row['title']." oyna";
        $sitename3 = $row['title'].", ".$row['title']." en kral oyun, ".$row['title']." bedava, ".$row['title']." oyunlari,";
        $filewidth = $row['width'];
        $fileheight = $row['height'];
        $filestatus = $row['status'];
        $filetype = $row['filetype'];
        
        }
    }
    
    
    <title><?php echo $filetitle; ?></title>
    <base href="http://www.zenoyun.com/">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9" />
    <meta name="google-site-verification" content="gu708AoeIfbyvbz3aP4Lr68HjcNQPSJTuxnlF52WzXs" />
    <Link rel="SHORTCUT ICON" href="/images/zenoyun.ico" />
    <style type="text/css" media="all" />
    @import url(/images/zenoyuntam.css);
    </style>
    <!--[if IE]>
    <link rel="stylesheet" href="/images/all-ie.css" type="text/css" media="screen" />
    <![endif]-->
    
    
        // Redirect to index page if game isn't working
        if ($filestatus == '0') {
            header("Location: ".$siteurl."/");
            exit();
        }
    
    // Display file
    function displayfile($filename,$filewidth,$fileheight,$filetype,$filelocation) {
        global $siteurl, $filesdir;
        if ($filelocation == '1') {
            $fileurl = $siteurl.$filesdir."/".$filename;
        } else {
            $fileurl = $filename;
        }
    if ($filetype == '1') {
    ?>
    aldığım hata:

    Alıntı
    Parse error: syntax error, unexpected '<' in /home/zenoyun/public_html/tamekranoyna.php on line 35
    yardımcı olanlara şimdiden teşekkürler
  • 24-09-2010, 23:40:55
    #2
    <title>dan önce ?> ekleyiniz
    .
    .
    .
    }
    ?>

    <title>.....</title>
  • 24-09-2010, 23:53:39
    #3
    hocam titleden sonra devam eden php kod var ondan acık braktım orayı kapatırsam birdaha acmam gerekecek ?
  • 25-09-2010, 00:04:13
    #4
    dedğiniz kodları dediğiniz yere ekledim sayfadaki kodların son hali bu

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <title><?php echo $sitename2; ?></title>
    <base href="http://www.zenoyun.com/">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9" />
    <meta name="google-site-verification" content="gu708AoeIfbyvbz3aP4Lr68HjcNQPSJTuxnlF52WzXs" />
    <Link rel="SHORTCUT ICON" href="/images/zenoyun.ico" />
    <style type="text/css" media="all" />
    @import url(/images/zenoyuntam.css);
    </style>
    <!--[if IE]>
    <link rel="stylesheet" href="/images/all-ie.css" type="text/css" media="screen" />
    <![endif]-->
    
    <body>
    <center>
    <table width="100%" border="0">
      <tr>
        <td>
    <?php
    
    include ("includes/config.php");
    
    $fileid = $_GET['fileid'];
    if (is_numeric($fileid)) {
        $sql = mysql_query("SELECT * FROM files WHERE fileid = '$fileid' LIMIT 1");
        
        if (mysql_num_rows($sql) > 0) {
        while($row = mysql_fetch_assoc($sql)){
        
        $fileid = $row['fileid'];
        $filename = $row['file'];
        $icon = $row['icon'];
        $filelocation = $row['filelocation'];
        $iconlocation = $row['iconlocation'];
        $filetitle2 = $row['title'];
        $filetitle = $row['title'].", ".$row['title']." oyna";
        $sitename3 = $row['title'].", ".$row['title']." en kral oyun, ".$row['title']." bedava, ".$row['title']." oyunlari,";
        $filewidth = $row['width'];
        $fileheight = $row['height'];
        $filestatus = $row['status'];
        $filetype = $row['filetype'];
        
        }
    }
    }
    ?>
    
    <title><?php echo $filetitle; ?></title>
    <base href="http://www.zenoyun.com/">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9" />
    <meta name="google-site-verification" content="gu708AoeIfbyvbz3aP4Lr68HjcNQPSJTuxnlF52WzXs" />
    <Link rel="SHORTCUT ICON" href="/images/zenoyun.ico" />
    <style type="text/css" media="all" />
    @import url(/images/zenoyuntam.css);
    </style>
    <!--[if IE]>
    <link rel="stylesheet" href="/images/all-ie.css" type="text/css" media="screen" />
    <![endif]-->    
    
        // Redirect to index page if game isn't working
        if ($filestatus == '0') {
            header("Location: ".$siteurl."/");
            exit();
        }
    
    // Display file
    function displayfile($filename,$filewidth,$fileheight,$filetype,$filelocation) {
        global $siteurl, $filesdir;
        if ($filelocation == '1') {
            $fileurl = $siteurl.$filesdir."/".$filename;
        } else {
            $fileurl = $filename;
        }
    if ($filetype == '1') {
    ?>
    suan 92 satırda hata alıyorum
    hata :

    Alıntı
    Parse error: syntax error, unexpected T_ELSEIF in /home/zenoyun/public_html/tamekranoyna.php on line 92
    hatayı veren kodlar :

    <?php
    } elseif ($filetype == '2') {
    ?>
  • 25-09-2010, 00:12:35
    #5
    sayfadaki tüm php kodlarını at burda 72 satır kod var. ayrıca title bir html kodtur. php ile alakası yok o yuzden phpnin dışında olmalıdır.
  • 25-09-2010, 00:16:44
    #6
    teşekkürler sorunu halettim hocam. title bir html koddur ama değerler veritabanından alındığı için mecburen işin içine dinamik kodlarda giriyor.
  • 25-09-2010, 00:41:33
    #7
    iyi de siz az evvel php nin içine html koymuşsunuz farkında olmadan. neyse iyi geceler