index.php
Cytat
<?xml version="1.0" encoding="iso-8859-2"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta name="Description" content=" [wstaw tu opis strony] " />
<meta name="Keywords" content=" [wstaw tu slowa kluczowe] " />
<meta name="Author" content=" [dane autora] " />
<meta name="Generator" content="kED" />
<title> [tytuł strony] </title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<?php
include("strony.php");
?>
<div id="home">
<div id="logo">
miejsce na logo
</div>
<div id="menul">
<?php
include("menu.php");
?>
</div>
<div id="menup">
</div>
<div id="rek1">
bootomy:D
</div>
<div id="rek2">
bootom2
</div>
<div id="rek3">
</div>
<div id="news">
news
</div>
<div id="stop">
copy by dzesi
</div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta name="Description" content=" [wstaw tu opis strony] " />
<meta name="Keywords" content=" [wstaw tu slowa kluczowe] " />
<meta name="Author" content=" [dane autora] " />
<meta name="Generator" content="kED" />
<title> [tytuł strony] </title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<?php
include("strony.php");
?>
<div id="home">
<div id="logo">
miejsce na logo
</div>
<div id="menul">
<?php
include("menu.php");
?>
</div>
<div id="menup">
</div>
<div id="rek1">
bootomy:D
</div>
<div id="rek2">
bootom2
</div>
<div id="rek3">
</div>
<div id="news">
news
</div>
<div id="stop">
copy by dzesi
</div>
</div>
</body>
</html>
------------------------
menu.php
Cytat
<a href="?idx=1">aaa</a>
-----------------------------
strony.php
Cytat
<?php
switch($_GET['idx'])
{
case 'dod':
echo 'Jak nie damy komendy "break", to pokaże nam się też...<br/>';
case '1':
include("1.php");
break;
case '2':
include("2.html");
break;
case '3':
echo '3.html';
break;
default:
echo 'Wyświetlenie danych';
}
?>
switch($_GET['idx'])
{
case 'dod':
echo 'Jak nie damy komendy "break", to pokaże nam się też...<br/>';
case '1':
include("1.php");
break;
case '2':
include("2.html");
break;
case '3':
echo '3.html';
break;
default:
echo 'Wyświetlenie danych';
}
?>
---------------
1.php
Cytat
<body>
<div id="home">
<div id="logo">
miejsce na logo
</div>
<div id="menul">
<a href="?idx=1>oo</a>
</div>
<div id="menup">
</div>
<div id="rek1">
bootomy:D
</div>
<div id="rek2">
bootom2
</div>
<div id="rek3">
</div>
<div id="news">
newsxxxxxxxxxxxxxxxxxxxx
</div>
<div id="stop">
copy by dzesi
</div>
</div>
<?php
include("strony.php")
?>
</body>
</html>
<div id="home">
<div id="logo">
miejsce na logo
</div>
<div id="menul">
<a href="?idx=1>oo</a>
</div>
<div id="menup">
</div>
<div id="rek1">
bootomy:D
</div>
<div id="rek2">
bootom2
</div>
<div id="rek3">
</div>
<div id="news">
newsxxxxxxxxxxxxxxxxxxxx
</div>
<div id="stop">
copy by dzesi
</div>
</div>
<?php
include("strony.php")
?>
</body>
</html>
jak odpalam index.php pokazuje mi komunikat
Parse error: syntax error, unexpected T_STRING in c:\program files\apache group\apache\htdocs\index.php on line 1
ale jak do indexu sam kod php dami klikam w zalacznik ktory jest w menu to pokazuje mi sie miejsce na logo
bootomy:D
bootom2
newsxxxxxxxxxxxxxxxxxxxx
copy by dzesi
miejsce na logo
bootomy:D
bootom2
newsxxxxxxxxxxxxxxxxxxxx
ale tego jest kilkanascie tysiecy lini ponad 20tysiecy
chodzi mi o to ze jak stworze szablon np index.php
i strona.php,costam.php to che zeby np jak klikne w indexie.php na link zeby pzrenioslo mnie do costam.php ale jak w cos tam incliuduje strony.php to znow jest ponad 20tysiecy lini tego samego testu a tak napwde na stronie sa dwa zdania
mozecie mi wytlumaczyc jak mam dobrze to zrobic?
--------
szukalem w calym forum i w gogle odpwoiedzi nieznalazlem:(
dziekuje za pomoc i za cierpliwosc:)
tu mozecie zobaczyc jak to dziala