Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> ?page nie przekazuje zmiennej, dzialalo i przestalo ;)
TheArt
post 20.09.2007, 17:40:07
Post #1





Grupa: Zarejestrowani
Postów: 83
Pomógł: 0
Dołączył: 20.09.2007

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


Witam.

Mam kod:

Kod
  <a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','gfx/m/1a.jpg',1)"><img src="gfx/m/1.jpg" alt="Strona Główna" name="Image3" width="150" height="43" border="0" id="Image3" /></a>
        <a href="?page=aktualnosci" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image21','','gfx/m/2a.jpg',1)"><img src="gfx/m/2.jpg" alt="Aktualności" name="Image21" width="150" height="39" border="0" id="Image21" /></a>
        <a href="?page=mapa" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','gfx/m/3a.jpg',1)"><img src="gfx/m/3.jpg" alt="Mapa" name="Image5" width="150" height="39" border="0" id="Image5" /></a>
        <a href="?page=rozklad" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','gfx/m/4a.jpg',1)"><img src="gfx/m/4.jpg" alt="Rozkład jazdy" name="Image6" width="150" height="39" border="0" id="Image6" /></a>
        <a href="?page=tabor" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','gfx/m/5a.jpg',1)"><img src="gfx/m/5.jpg" alt="Tabor" name="Image7" width="150" height="39" border="0" id="Image7" /></a>
        <a href="?page=oferta" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','gfx/m/6a.jpg',1)"><img src="gfx/m/6.jpg" alt="Oferta" name="Image16" width="150" height="39" border="0" id="Image16" /></a>
        <a href="?page=galerie" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','gfx/m/7a.jpg',1)"><img src="gfx/m/7.jpg" alt="Galerie" name="Image9" width="150" height="39" border="0" id="Image9" /></a>
        <a href="?page=gkw" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','gfx/m/8a.jpg',1)"><img src="gfx/m/8.jpg" alt="GKW" name="Image10" width="150" height="39" border="0" id="Image10" /></a>
      
        <?php if($page == null)             {
             include "tresc/glowna.php"; }
             if($page == "aktualnosci") {
             include "tresc/aktualnosci.php"; }
             if($page == "tabor") {
             include "tresc/tabor.php"; }
             if($page == "rozklad") {
             include "tresc/rozklad.php"; }
             if($page == "galerie") {
             include "tresc/galerie.php"; }
             if($page == "gkw") {
             include "tresc/gkw.php"; }


              ?>


jeszcze wczoraj na serwerze nazwa.pl dzialalo, to znaczy inkludowal sie odpowiedni plik, teraz na OVH nie dziala, $page ciagle przybiera nula, wie ktos o co chodzi?

Ten post edytował TheArt 20.09.2007, 17:40:39
Go to the top of the page
+Quote Post
k@mil
post 20.09.2007, 17:55:50
Post #2





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 19.08.2007
Skąd: Glinnik

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


jezeli przekazujesz zmienna tak:
index.php?page=costam

to zawartosc (czyli costam) pobierasz przez $_GET['page']
$page jest jezeli masz wlaczone register_globals
ale jak ktos na tym forum napisal to jest "czysta glupota"
Go to the top of the page
+Quote Post
TheArt
post 20.09.2007, 19:47:29
Post #3





Grupa: Zarejestrowani
Postów: 83
Pomógł: 0
Dołączył: 20.09.2007

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


rozumiem, sprobuje sie z tym pobawic, dzieki!

Ten post edytował TheArt 20.09.2007, 21:40:02
Go to the top of the page
+Quote Post
klocu
post 20.09.2007, 20:32:13
Post #4





Grupa: Zarejestrowani
Postów: 291
Pomógł: 45
Dołączył: 21.08.2007

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


zamień wszystkie zmienne w plikach do ktorych odnosisz się linkami ?page= z $page na $_GET['page'] co powinno rozwiązać Twoj problem...

dokładniej w tym if'ie zamień jedno na drugie i napisz jakie to dało rezultaty.

Ten post edytował klocu 20.09.2007, 20:33:15
Go to the top of the page
+Quote Post
TheArt
post 20.09.2007, 21:34:17
Post #5





Grupa: Zarejestrowani
Postów: 83
Pomógł: 0
Dołączył: 20.09.2007

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


dziala chlopaki! jestescie wielcy
Go to the top of the page
+Quote Post
skowron-line
post 20.09.2007, 21:35:56
Post #6





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

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


Cytat(TheArt @ 20.09.2007, 18:47:29 ) *
mozesz mi przepisac moj kod, z uzyciem $_GET['page'], bede bardzo wdzieczny

za ten tekst powinienes dostac od moda +10


--------------------
I'm so fast that last night I turned off the light switch in my hotel room and was in bed before the room was dark - Muhammad Ali.
Peg jeżeli chcesz uprawiać sex to dzieci muszą wyjść, a jeżeli chcesz żeby był dobry ty też musisz wyjść - Al Bundy.

QueryBuilder, Mootools.net, bbcradio1::MistaJam
http://www.phpbench.com/
Go to the top of the page
+Quote Post
TheArt
post 20.09.2007, 21:40:31
Post #7





Grupa: Zarejestrowani
Postów: 83
Pomógł: 0
Dołączył: 20.09.2007

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


sa tez "tacy" winksmiley.jpg

dzieki za wszystko

EOT
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 19.07.2025 - 05:57