Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Zmiana katalogu pobieranych plikow, brak rozwiazania...
annsin
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 28.07.2005

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


Co zmienic w tym kodzie aby pliki byly pobierane np z podkatalogu "dane"
a nie z katalogu glownego ?
  1. <?
  2. if($page=="") $page="link1";
  3. if(!file_exists($page.".php")) 
  4. {
  5.  include "default.php";
  6. }
  7. else 
  8. {
  9. include_once $page.".php";
  10. }
  11.  
  12. ?>


Ten post edytował annsin 20.08.2007, 13:52:16
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Cysiaczek
post
Post #2





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Popraw proszę tytuł topiku na zgodny z zasadami forum Przedszkole

  1. <?php
  2. if($page=="") "dane/".$page="link1";
  3. if(!file_exists($page.".php")) 
  4. {
  5.  include "dane/default.php";
  6. }
  7. else 
  8. {
  9. include_once $page.".php";
  10. }
  11. ?>
Go to the top of the page
+Quote Post
annsin
post
Post #3





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 28.07.2005

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


Cytat(Cysiaczek @ 18.08.2007, 07:23:12 ) *
Popraw proszę tytuł topiku na zgodny z zasadami forum Przedszkole
  1. <?php if($page==&#092;"\") \"dane/\".$page=\"link1\"; if(!file_exists($page.\".php\"))  {  include \"dane/default.php\"; } else  { include_once $page.\".php\"; }?>
Czy oby napewno ten kod jest poprawny ??Linki do tej pory mialem tej postaci
  1. index.php?page=registration...
i dzialaly..Po przerzuceniu plikow do katalogu "dane" linki nie dzialaja....Czy ktos moze mi pomoc (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
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: 4.10.2025 - 21:30