İnclude Require Uygulaması

İnclude Require Uygulaması

  index.php
<html>
<body>
<table>
  <tr>
    <td><?php include("ust.php"); ?></td>
  </tr>
</table>
<table border="1">
  <tr>
    <td valign="top"><?php include("sol.php"); ?></td>
    <td>
        <?php
       
        switch($_GET['sayfa']){
                case 0:include("orta.php"); break;
                case 1:include("hakkimizda.html"); break;
                case 2:include("fotograflar.html"); break;
                case 3:include("iletisim.html"); break;
                case 4:include("mail.html"); break;
                case 5:include("sayfabilgileri.html"); break;
        }
       
        ?>
    </td>
  </tr>
</table>
<table  border="1">
  <tr>
    <td><?php include("alt.php"); ?></td>
  </tr>
</table>
</body>
</html>
 
sol.php
 
<table style="background-color:#CCFF99">
<?php

$SolLinkler=array("hakkimizda","fotograflar","iletisim","mail","sayfabilgileri");

foreach($SolLinkler as $Index=>$Deger){
        echo '<tr><td><a href="'.$_SERVER['PHP_SELF'].'?sayfa='.($Index+1).'">'.$Deger.'</a></td></tr>';
}

?>
</table>
 

Yorumunuzu Ekleyin


Yükleniyor...
Yükleniyor...