Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP]System podstron
eXTrim
post
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 1.02.2007

Ostrzeżenie: (0%)
-----


Witam, nurtuje mnie pytanie w jaki sposób tworzyć małe serwisy internetowe z "5 podstronami",
1. Czy stosować cały kod html z index.html i tylko zmieniać treść podstron czy lepiej używać do tego include.
2. Jak ma się includowanie z późniejszym pozycjonowaniem strony.
3. Czy stosowanie całego kodu nie spowolni za bardzo wczytywanie tych podstron ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
gigzorr
post
Post #2





Grupa: Zarejestrowani
Postów: 652
Pomógł: 47
Dołączył: 6.02.2010
Skąd: Radom

Ostrzeżenie: (0%)
-----


  1. switch($_GET['podstrona'])
  2. {
  3. default: include("index.php");
  4. case 'gry': include("gry.php"); break;
  5. }


gotowe (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
askone
post
Post #3





Grupa: Zarejestrowani
Postów: 654
Pomógł: 121
Dołączył: 27.10.2007
Skąd: Poznań, Łódź

Ostrzeżenie: (0%)
-----


Cytat(gigzorr @ 25.08.2010, 13:06:15 ) *
  1. switch($_GET['podstrona'])
  2. {
  3. default: include("index.php");
  4. case 'gry': include("gry.php"); break;
  5. }


gotowe (IMG:style_emoticons/default/smile.gif)


Jedna mała zmiana - ponieważ kod include jest już w pliku index.php to nie może on sam siebie znów includować (IMG:style_emoticons/default/winksmiley.jpg) Tak więc powinno być tak:
  1. switch($_GET['podstrona'])
  2. {
  3. default: include("glowna.php");
  4. case 'gry': include("gry.php"); break;
  5. }


Pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 10.10.2025 - 02:59