İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

değişkeni titlede gösterme

ankara

0
İyinet Üyesi
Katılım
27 Ekim 2006
Mesajlar
397
Reaction score
0
Konum
Gemlik - Bursa
arkadaslar bir <?php echo $title; ?> ile title taglarına yazdırıorum ama titlem sayfanınn en altında üste alınca çalışmıyor neden olabilir sayfa açılıyor sonra title değişiyor üst bölümde header arasınad kullanamıyorum. bir yöntemi varmı bunun
 

redbaron

0
İyinet Üyesi
Katılım
12 Mayıs 2006
Mesajlar
675
Reaction score
0
hazır bir script kullanıyorsun anlaşılan
$title değişkenine herhangi bir atama yapılmıyor demekki header kısmından önce ki boş oluyor o anda değişkenin.

<title> tagı arasını birşeyler yazdırmak istiyorsan bu tagdan önce $title içini doldurman gerek.
 

ankara

0
İyinet Üyesi
Katılım
27 Ekim 2006
Mesajlar
397
Reaction score
0
Konum
Gemlik - Bursa
<title><?php echo $title; ?></title> olarak yazdırdım ama sayfanın altında
head kısmında değil nasıl yapabilirim

$title die birşey var sayfada zaten yazıor Başlık : <?php echo $title; ?>

die
 

selim61

0
İyinet Üyesi
Onaylı Üye
Katılım
10 Mayıs 2006
Mesajlar
5,299
Reaction score
11
Konum
<?=selim61?>
daha açık olmalısın, $title ı nerden nereye çekiyorsun? tüm sayfa kodlarını pm atarmısın?
 

ankara

0
İyinet Üyesi
Katılım
27 Ekim 2006
Mesajlar
397
Reaction score
0
Konum
Gemlik - Bursa
PHP:
<?php include('setting.php'); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
[B]TİTLE NORMALDE BURADA OLMASI GEREKLİ AMA BURADA DEĞİŞKEN GÖSTERMİYOR [/B]
<meta http-equiv="Content-Language" content="tr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="imagetoolbar" content="no" />
	<meta name="MSSmartTagsPreventParsing" content="true" />
	<style type="text/css" media="all">@import "css/style.css";</style>
	<style type="text/css" media="all">@import "images/style.css";</style>
	<script type="text/javascript" src="./js/prototype.js"></script>
	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss/" />
</head>
<?php include("header.php");

$ytdevid = "-------------";  // YouTube Developer ID
$video = file("http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=".$ytdevid."&video_id=".$_GET[video]);
$video = implode("", $video);
preg_match_all('/\<title\>(.*?)\<\/title\>(.*?)\<description\>(.*?)\<\/description\>(.*?)\<thumbnail_url\>(.*?)\<\/thumbnail_url\>/s', $video, $matches);
$title = $matches[1][0];
$description = $matches[3][0];
$thumbnail2 = $matches[5][0];
$length = strlen($thumbnail2);
$thumbnail1 = substr($thumbnail2, 0, $strlen - 5)."1.jpg";
$thumbnail3 = substr($thumbnail2, 0, $strlen - 5)."3.jpg";

$videopage = file("http://www.youtube.com/watch?v=".$_GET[video]);
$videopage = implode("", $videopage);
preg_match_all('/\<div class=\"vWatchEntry  \"\>(.*?)\<a href=\"\/watch\?v=(.*?)&mode=related&search=\" name=\"(.*?)\"\>\<img class=\"(.*?)\" src=\"(.*?)\" \/\>\<\/a\>(.*?)print_quicklist_video\(\'(.*?)\',document\.getElementById\(\'(.*?)\'\)\.innerHTML(.*?)\<div class=\"title\" onclick=\"_hbLink\(\'RelatedVideo\',\'ExploreMore\'\);\"\>\<b\>\<a href=\"\/watch\?v=(.*?)&mode=related&search=\" id=\"(.*?)\"\>(.*?)\<\/a\>\<\/b\>\<br\/\>(.*?)\<\/div\> \<!-- end vWatchEntry --\>/s', $videopage, $matches);
$Related = $matches;

?>


<table width="750" border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<b><?php echo $title; ?></b> <br />
	Description:
<blockquote>
	<?php echo $description; ?><br />
</blockquote>
</td>
</tr>
  
<tr>
<td align="center">
<table border="0" width="100%" id="table1">
	<tr>
		<td width="143" rowspan="2">GOOGLE</td>
		<td width="425">
<a target="_blank" href="http://www.randevum.com/earmoney/earmoney.php3?affliate_id=c0f780349b9b117c96813b1e87756038&banner_id=54">
<img  border="0" src="http://resimler.randevum.com/banners/54.gif" width="424" height="120"></a></td>
		<td rowspan="2">GOOLGE</td>
	</tr>
	<tr>
		<td width="425">
<p align="center">
<embed src="http://www.youtube.com/v/<?php echo $_GET[video]; ?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></td>
		</tr>
</table>
</embed><br />
<br />
<img src="<?php echo $thumbnail1; ?>" /> <img src="<?php echo $thumbnail2; ?>" /> <img src="<?php echo $thumbnail3; ?>" /><br />

</td>
</tr>
  
<tr>
<td align="center">
	<form name="urlForm" id="urlForm">
            <table cellpadding="0" cellspacing="0" id="vidFacetsTable">
           
            <tr><td class="label">URL</td>
            <td>
            <input name="video_link" type="text" value="<?php echo $website[url];?>/watch.php?video=<?php echo $_GET[video]; ?>" class="vidURLField" onClick="javascript:document.urlForm.video_link.focus();document.urlForm.video_link.select();" size="75" readonly="true">
            </td>
            </tr>
            <tr><td class="smallLabel">Embed Code</td>

            <td>
            <input name="embed_code" type="text" value='<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/<?php echo $_GET[video]; ?>"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<?php echo $_GET[video]; ?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>' class="vidURLField" onClick="javascript:document.urlForm.embed_code.focus();document.urlForm.embed_code.select();" size="75" readonly="true">
            </td></tr>
            </table>
            </form>

</td>
</tr>
</table>
 <?php include("getlink.php"); ?>
<?php include("footer.php"); ?>
[B]<title><?php echo $title; ?></title>[/B]

head arasında bold ile belirtiğim yerde $title değişkenini gösteremiyorum en alta gösteriyorum buda sayfa açılınca title atıyor olması nasıl head arasına alabilirim <title><?php echo $title; ?></title> alınca head a çalışmıor
 

selim61

0
İyinet Üyesi
Onaylı Üye
Katılım
10 Mayıs 2006
Mesajlar
5,299
Reaction score
11
Konum
<?=selim61?>
PHP:
<?php include('setting.php'); ?>
<?php include("header.php");

$ytdevid = "-------------";  // YouTube Developer ID
$video = file("http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=".$ytdevid."&video_id=".$_GET[video]);
$video = implode("", $video);
preg_match_all('/\<title\>(.*?)\<\/title\>(.*?)\<description\>(.*?)\<\/description\>(.*?)\<thumbnail_url\>(.*?)\<\/thumbnail_url\>/s', $video, $matches);
$title = $matches[1][0];
$description = $matches[3][0];
$thumbnail2 = $matches[5][0];
$length = strlen($thumbnail2);
$thumbnail1 = substr($thumbnail2, 0, $strlen - 5)."1.jpg";
$thumbnail3 = substr($thumbnail2, 0, $strlen - 5)."3.jpg";

$videopage = file("http://www.youtube.com/watch?v=".$_GET[video]);
$videopage = implode("", $videopage);
preg_match_all('/\<div class=\"vWatchEntry  \"\>(.*?)\<a href=\"\/watch\?v=(.*?)&mode=related&search=\" name=\"(.*?)\"\>\<img class=\"(.*?)\" src=\"(.*?)\" \/\>\<\/a\>(.*?)print_quicklist_video\(\'(.*?)\',document\.getElementById\(\'(.*?)\'\)\.innerHTML(.*?)\<div class=\"title\" onclick=\"_hbLink\(\'RelatedVideo\',\'ExploreMore\'\);\"\>\<b\>\<a href=\"\/watch\?v=(.*?)&mode=related&search=\" id=\"(.*?)\"\>(.*?)\<\/a\>\<\/b\>\<br\/\>(.*?)\<\/div\> \<!-- end vWatchEntry --\>/s', $videopage, $matches);
$Related = $matches;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><title>
<?=$title?></title>
<meta http-equiv="Content-Language" content="tr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <style type="text/css" media="all">@import "css/style.css";</style>
    <style type="text/css" media="all">@import "images/style.css";</style>
    <script type="text/javascript" src="./js/prototype.js"></script>
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss/" />
</head>



<table width="750" border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<b><?php echo $title; ?></b> <br />
    Description:
<blockquote>
    <?php echo $description; ?><br />
</blockquote>
</td>
</tr>
  
<tr>
<td align="center">
<table border="0" width="100%" id="table1">
    <tr>
        <td width="143" rowspan="2">GOOGLE</td>
        <td width="425">
<a target="_blank" href="http://www.randevum.com/earmoney/earmoney.php3?affliate_id=c0f780349b9b117c96813b1e87756038&banner_id=54">
<img  border="0" src="http://resimler.randevum.com/banners/54.gif" width="424" height="120"></a></td>
        <td rowspan="2">GOOLGE</td>
    </tr>
    <tr>
        <td width="425">
<p align="center">
<embed src="http://www.youtube.com/v/<?php echo $_GET[video]; ?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></td>
        </tr>
</table>
</embed><br />
<br />
<img src="<?php echo $thumbnail1; ?>" /> <img src="<?php echo $thumbnail2; ?>" /> <img src="<?php echo $thumbnail3; ?>" /><br />

</td>
</tr>
  
<tr>
<td align="center">
    <form name="urlForm" id="urlForm">
            <table cellpadding="0" cellspacing="0" id="vidFacetsTable">
           
            <tr><td class="label">URL</td>
            <td>
            <input name="video_link" type="text" value="<?php echo $website[url];?>/watch.php?video=<?php echo $_GET[video]; ?>" class="vidURLField" onClick="javascript:document.urlForm.video_link.focus();document.urlForm.video_link.select();" size="75" readonly="true">
            </td>
            </tr>
            <tr><td class="smallLabel">Embed Code</td>

            <td>
            <input name="embed_code" type="text" value='<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/<?php echo $_GET[video]; ?>"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<?php echo $_GET[video]; ?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>' class="vidURLField" onClick="javascript:document.urlForm.embed_code.focus();document.urlForm.embed_code.select();" size="75" readonly="true">
            </td></tr>
            </table>
            </form>

</td>
</tr>
</table>
 <?php include("getlink.php"); ?>
<?php include("footer.php"); ?>
 

ankara

0
İyinet Üyesi
Katılım
27 Ekim 2006
Mesajlar
397
Reaction score
0
Konum
Gemlik - Bursa
anladım ben mantığı öğrendim kod üste olacak nasıl olsa kod görünmüor php koduı sonra html sonra değişken saolsın öğreniyoruz üstat TEŞEKKÜRLER EDERİM
 

selim61

0
İyinet Üyesi
Onaylı Üye
Katılım
10 Mayıs 2006
Mesajlar
5,299
Reaction score
11
Konum
<?=selim61?>
function yaparak çalışmalısın.hatta class.
kalıbı üstte bi function olarak tanımla, ayar dosyana at alttan getir($ytdevid,$video) birlikte functionu çagırırsan her yerde kullanırsın.
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst