include yardım

  • Konbuyu başlatan Konbuyu başlatan buğday
  • Başlangıç tarihi Başlangıç tarihi
Kodla Büyü

buğday

Seçkin Üye
Seçkin Üye
Mesajlar
308
selam arkadaşlar haber.php sayfamı index html içinde

Kod:
<td> <iframe src="haber.php" name="ana" onload="boyutlama();" scrolling="no"  id="iframe" frameborder="0" 

style="width:100%;" marginheight="0" marginwidth="0"></iframe>  </td>

bu şekilde çağırdım. explorerda düzgün gözüküyo firefox da hiç gözükmüyor. localhosttanmı kaynaklanıyor yoksa başka bi yanlışımmı var. chromede gözüküyo fakat kayıyor ona çare bulabilirimde firefoxda neden gözükmüyo. acaba bu şekilde iframe kullnmakmı mantıklı yoksa includemi etmek gerekir. hoş onuda beceremedim. include edince hiç gözükmüyo onun koduda direk yazdım <? include 'haber.php'; ?> bu şekilde.

bi yardım edin arkadaşlar. şimdiden teşekkürler
 
hocam bu yaptığın include olmuyor. çerçeve kullanmanı hiç tavsiye etmem. google tek sayfa olarak görebiliyor çerçeveleri ayrıca kaydırma çubuğu çıktığından dolayı hoş gözükmüyor
include komutunu kullan tabi...
 
onu beceremedim hocam. include komutunda hiç gözükmüyor. sayfa çağırmak için kodu direk table içine kod bölümünde yazdım. olmadı. googleden yazdım kodları. ne yapabilirim hocam
 
aynı dizinlerde ise <?php include "haber.php"; ?> yazarsan haber.php'nin içeriği gözükür o sayfada.
 
hocam iki sayfa olacak ikisi de php uzantılı olacak
birine include içeriğini yazacaksın diğerinde ise include çağıracaksın mesela;

include.php (1.si)
<?php
echo "merhaba";
?>
merhaba.php(2.si)
<?php
include("include.php");
?>
bunları çalıştırdığımızda include fonksiyonu çalışıyor.
 
@ruzgara karşı hocam aynısı yazdım gelmiyo.
@semraaa14 hocam biri html ana sayfa olan diğeri haber.php ikiside illa php olmasımı gerekio. include html de oluyo diye yazıyo kitapta off yaa
 
include ile çağrılan dosyanın uzantısı farketmezde eğer ana dosyanda php taglarını kullandıysan ki include yapmak için <? ?> bunu kullanmak zorundasın bu sayfanın uzantısı php olmalı ve dosyaları yüklediğin server ında bunu destelemesi lazım. ama bu şartlar yerindeyse Rüzgara Karşı nın yazdığı satırın çalışması lazımdır.
 
Bu İndex.html
Kod:
<html>
<head>
<title>ÇANDIR İLÇE MİLLİ EĞİTİM MÜDÜRLÜĞÜ</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" >
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<meta name="keywords" content="Resmi Web Sitesi."></meta>
<meta name="description" content=""></meta>
<style type="text/css">
<!--
tr td table tr td ul {
	margin: 0px;
	padding: 0px;
	list-style-type: none;
}
body table tr td table tr td ul li b a {
	line-height: 18px;
	color: #000;
	text-decoration: none;
	background-color: #FFF;
	display: block;
	margin-bottom: 1px;
	padding-left: 10px;
	font-size: 18px;
	border-top-color: #000;
	border-right-color: #000;
	border-bottom-color: #000;
	border-left-color: #000;
	font-family: "Arabic Typesetting";
}
body table tr td table tr td ul li b a:hover {
	color: #FFF;
	background-color: #06F;
}
.menu .menu {
	color: #FFF;
}
body {
	background-image: url(images/392.jpg);
	text-align: left;
}
-->
</style>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script language="JavaScript">
<!--
function boyutlama()
{
var yukseklik=document.getElementById('iframe').contentWindow.document.body.scrollHeight;
document.getElementById('iframe').height=yukseklik;
}
//-->
</script>
</head>
<body bgcolor="#ffffff">
<table width="82%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
  <tr> 
    <td width="1%"><img src="file:///C|/Users//Desktop/images/spacer.gif" width="16" height="1"></td>
    <td width="82%"><img src="file:///C|/Users//Desktop/images/spacer.gif" width="558" height="1"></td>
    <td width="3%">&nbsp;</td>
    <td width="12%"><img src="file:///C|/Users//Desktop/images/spacer.gif" width="128" height="1"></td>
    <td width="2%" background="file:///C|/Users//Desktop/images/bg_right.jpg"><img src="file:///C|/Users/Süleyman VURAL/Desktop/images/spacer.gif" width="12" height="1"></td>
  </tr>
  <tr> 
    <td background="file:///C|/Users//Desktop/images/bg_left.jpg" valign="top" align="right">&nbsp;</td>
    <td valign="top"> 
      <table width="100%" border="1" cellspacing="0" cellpadding="0">
        <tr>
          <td height="18" valign="top" align="left">&nbsp;</td>
        </tr>
        <tr>
          <td valign="top" height="75"> 
            <p>
              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="860" height="140" align="absmiddle" id="FlashID">
                <param name="movie" value="images/banner.swf">
                <param name="quality" value="high">
                <param name="wmode" value="opaque">
                <param name="swfversion" value="8.0.35.0">
                <!-- Bu param etiketi, Flash Player 6.0 r65 ve üzerini kullanan kullanıclardan Flash Player'ın en son sürümünü indirmesini ister. Kullanıcıların istemi görmesini istemiyorsanız bu etiketi silin. -->
                <param name="expressinstall" value="Scripts/expressInstall.swf">
                <!-- Sonraki nesne etiketi IE tarayıcısı dışındaki tarayıcılara yöneliktir. Bu nedenle IECC'yi kullanarak bu etiketi IE'de gizleyin. -->
                <!--[if !IE]>-->
                <object data="images/banner.swf" type="application/x-shockwave-flash" width="860" height="140" align="absmiddle">
                  <!--<![endif]-->
                  <param name="quality" value="high">
                  <param name="wmode" value="opaque">
                  <param name="swfversion" value="8.0.35.0">
                  <param name="expressinstall" value="file:///C|/Users//Desktop/Scripts/expressInstall.swf">
                  <!-- Tarayıcı, Flash Player 6.0 ve daha eskisini kullanan kullanıcılar için aşağıdaki alternatif içeriği görüntüler. -->
                  <div>
                    <h4>Bu sayfadaki i&ccedil;erik, Adobe Flash Player'&#305;n daha yeni bir s&uuml;r&uuml;m&uuml;n&uuml; gerektiriyor.</h4>
                    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Adobe Flash player Edinin" width="112" height="33" /></a></p>
                  </div>
                  <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
              </object>
            </p></td>
        </tr>
        <tr>
          <td valign="top" height="20" background="file:///C|/Users//Desktop/images/bg_menu.jpg" nowrap class="menu">&nbsp;</td>
        </tr>
        <tr>
          <td valign="top" align="right"> 
          
            <table width="16%" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#0099FF">
              <tr>
                <td bgcolor="#0099FF">&nbsp;</td>
              </tr>
              <tr>
                <td valign="top" width="136"><ul>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/ana.html">ANASAYFA</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/kurum.html">KURUMUMUZ</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/tarih.html">TARİHİMİZ</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/vizyon.html">VIZYONUMUZ</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/misyon.html">MİSYONUMUZ</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/personel.html">PERSONELİMİZ</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/kurs.html">KURSLARIMIZ</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/duyuru.html">DUYURULAR</a></b></li>
                  <li><b><a target="ana" href="file:///C|/Users//Desktop/iletisim.html">İLETİŞİM</a></b></li>
                </ul></td>
              </tr>
            </table>
            <table width="96%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> [b]<iframe src="haber.php" name="ana" onload="boyutlama();" scrolling="no"  id="iframe" frameborder="0" 

style="width:100%;" marginheight="0" marginwidth="0"></iframe>[/b]  </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td valign="top" align="center">&nbsp;</td>
        </tr>
        <tr>
          <td valign="top" align="center">&nbsp;</td>
        </tr>
        <tr>
          <td valign="top" align="center">
			<a target="_blank" href="http://www.meb.gov.tr/ataturk/ataturk.html">
			<img src="images/atam.jpg" width="159" height="52"></a>
			<a target="_blank" href="http://www.egitimedestek.meb.gov.tr/">
			<img src="images/logo2.gif" width="61" height="51"></a>
			<a href="http://emezun.meb.gov.tr/">
			<img src="images/emezun.jpg" width="100" height="50"></a>
			<a target="_blank" href="http://haydikizlarokula.meb.gov.tr/">
			 <img src="images/haydikizlarokula.gif" width="50" height="50"></a>
			<a target="_blank" href="https://e-okul.meb.gov.tr/logineOkul.aspx">  <img src="images/okul.jpg" width="100" height="50"> </a>
			<a target="_blank" href="http://www.turkiyebebegi.gov.tr/">
			 <img src="images/sehitler.jpg" width="90" height="50"><img border="0" src="images/elifbebek.jpg" width="110" height="54"></a>
			<a target="_blank" href="http://earged.meb.gov.tr/bubenimeserim/">
			<img border="0" src="images/bubenimeserim.jpg" width="110" height="54"></a></td>
        </tr>
      </table>
    </td>
    <td valign="top">&nbsp;</td>
    <td valign="top"><p>&nbsp;</p>
      <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p></td>
    <td background="file:///C|/Users//Desktop/images/bg_right.jpg" valign="top" align="left">&nbsp;</td>
  </tr>
  <tr>
    <td background="file:///C|/Users//Desktop/images/bg_left.jpg">&nbsp;</td>
    <td colspan="3" align="center">&nbsp; </td>
    <td background="file:///C|/Users//Desktop/images/bg_right.jpg">&nbsp;</td>
  </tr>
  <tr> 
    <td background="file:///C|/Users//Desktop/images/bg_left.jpg">&nbsp;</td>
    <td colspan="3" background="file:///C|/Users//Desktop/images/bg_menu.jpg" valign="middle" align="center">&nbsp; 
    </td>
    <td background="file:///C|/Users//Desktop/images/bg_right.jpg">&nbsp;</td>
  </tr>
</table>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"  size="1">
	Web Tasarım: </div>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</body>
</html>


siyah kısımda senin kodu yazıyorum boş ekran görüntüsü veriyor.hocam localhosttan kaynaklı değil dimi


siyah kısım gözükmemiş table arasında haber.php çağıracam bu sayfada. senin verdiğin dökümanda ikiside php @ruzgarakarşı hocam
 
Rüzgara Karşı' Alıntı:
semraaa14' Alıntı:
hocam iki sayfa olacak ikisi de php uzantılı olacak
uzantı .php olacak diye bir şart yok. mesela .inc de olabilir...

evet gerek yok. yanlız bir tanesi olmak zorunda..
include.html
<table width="487" height="261" border="1">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
include.php
<?php
include("include.html");
?>
 
BBNET
Geri
Üst