Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> case i else if itp
dabb
post
Post #1





Grupa: Zarejestrowani
Postów: 54
Pomógł: 0
Dołączył: 13.11.2003
Skąd: Poznań

Ostrzeżenie: (30%)
XX---


Jak do tego kodu ponizej wmontowac funkcje switch/case ale tylko zeby po kliknieciu na http://localhost/index.php ladowalo sie pole default a po kliknieciu juz na ?do=archiwes normalnie to cojest zdeklarowane. Ja juz nie mam sily (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

  1. <?php
  2. $path = &#092;".\";
  3. $moje = &#092;"./inc/includ\";
  4. if($do == &#092;"search\" or $dosearch == \"yes\"){ $subaction = \"search\"; $dosearch = \"yes\"; include(\"$path/search.php\"); }
  5. elseif($do == &#092;"archives\"){ include(\"$path/show_archives.php\"); }
  6. elseif($do == &#092;"publikacje\"){ include(\"$path/show_news.php\"); }
  7. elseif($do == &#092;"galeria\"){ include(\"galeria.php\"); }
  8. elseif(file_exists(&#092;"$moje/$do.php\")){include(\"$moje/$do.php\");}
  9. else{include(&#092;"$path/show_news.php\");}
  10. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 23.08.2025 - 14:09