Urob si normalne stranku v html takto:
Kód:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ibm852" />
<title><?php echo $titul_stranky; ?></title>
</head>
<body>
<table width = "800" height="600" border="0">
<tr>
<td>Tu bude menu</td>
<td></td>
</tr>
</table>
</body>
</html>
a teraz to len rozdel na zahlavie a patu
kod zahlavia a uloz to ako napr zahlavie.inc
Kód:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ibm852" />
<title><?php echo $titul_stranky; ?></title>
</head>
<body>
<table width = "800" height="600" border="0">
<tr>
<td>Tu bude menu</td>
<td>
a teraz patu a uloz napr pata.inc
Kód:
</td>
</tr>
</table>
</body>
</html>
a teraz len vytvor index.php
Kód:
<?php # index.php
$titul_stranky = '.home';
include ('sablony/zahlavie.inc'); //vlozenie suboru zahlavie
echo '<p>Toto je ako main frame</b></p>';
include ('sablony/pata.inc');
?>
a tak isto budes vytvarat ostatne stranky, ako index.