Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> przekierowanie po autoryzacji, autoryzacja ok ale nie otwiera strony
timmy
post
Post #1





Grupa: Zarejestrowani
Postów: 38
Pomógł: 0
Dołączył: 23.11.2005

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


Wszystko dziala autoryzacja uzytkownika jest ok, ale nie chce przejsc pozniej do nastepnej stronki.

Problem jest w tej czesci kodu:

.....

46 if ($_POST["cmd"]<>"") $pass=$_POST["sms"]; else $pass=$_COOKIE["cmdc"];
47 if (checkpass($pass, 5)) {
48 include ("index?site=site1&");
49 }
50 else {
51 echo '
....

rezultatem wykonania jest:

Warning: main(index?site=site1&): failed to open stream: No such file or directory in [sciezka]\login.php on line 48

Warning: main(): Failed opening 'index?site=site1&' for inclusion (include_path='.:/usr/local/lib/php') in [sciezka]/login.php on line 48

w jaki sposob zrobic to przekierowanie, zeby chodzilo?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 8)
ens0re
post
Post #2





Grupa: Zarejestrowani
Postów: 143
Pomógł: 0
Dołączył: 23.08.2005
Skąd: Warszawa

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


  1. <?php
  2. header("Location: index?site=site1&");
  3. ?>


I jesli bedziesz miał z tym bład to na poczatku skryptu wstaw
  1. <?php
  2. ?>

i na koncu
  1. <?php
  2. ?>


Ten post edytował ens0re 28.12.2005, 19:23:31
Go to the top of the page
+Quote Post
ennics
post
Post #3





Grupa: Zarejestrowani
Postów: 312
Pomógł: 0
Dołączył: 29.12.2004

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


  1. <?php
  2.  
  3. header("Location: index?site=site1&");
  4.  
  5. ?>

gwoli ścisłości (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post
timmy
post
Post #4





Grupa: Zarejestrowani
Postów: 38
Pomógł: 0
Dołączył: 23.11.2005

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


W pierwszym przypadku:

Cannot modify header information - headers already sent by

W drugim wyskakuje wewnetrzny blad serwera

Moze jakis inny sposob?
Go to the top of the page
+Quote Post
ennics
post
Post #5





Grupa: Zarejestrowani
Postów: 312
Pomógł: 0
Dołączył: 29.12.2004

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


hm, powinieneś raczej zastanowić się nad blędem serwera.
  1. <?php
  2.  
  3. index?site=site1&
  4. // może ?
  5. index.php?site=site1&
  6.  
  7. ?>
Go to the top of the page
+Quote Post
AxZx
post
Post #6





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 55
Dołączył: 1.03.2005
Skąd: śląsk

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


przeciez ci napisal co masz zrobic

  1. <?php
  2.  
  3.  
  4. //na poczatku strony
  5.  
  6.  
  7.  
  8. //na koncu stronu
  9.  
  10.  
  11. ?>


Ten post edytował AxZx 28.12.2005, 19:30:23
Go to the top of the page
+Quote Post
ens0re
post
Post #7





Grupa: Zarejestrowani
Postów: 143
Pomógł: 0
Dołączył: 23.08.2005
Skąd: Warszawa

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


Przecież Ci podałem...Na poczatku skryptu ob_start(); (tuż zaraz po <?php..) i na koncu skryptu ob_end_flush(); (tuż przed ..?>)....
Go to the top of the page
+Quote Post
timmy
post
Post #8





Grupa: Zarejestrowani
Postów: 38
Pomógł: 0
Dołączył: 23.11.2005

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


to mialo byc przed odczytaniem ciacha?

przy tym co podales wyrzucil wewnetrzny blad serwera ale wrzucilem po ciastku

tetraz jest

line 48 include ("index.php?site=site1&");

i nadal


Warning: main(index.php?site=site1&): failed to open stream: No such file or directory in [sciezka]\login.php on line 48

Warning: main(): Failed opening 'index.php?site=site1&' for inclusion (include_path='.:/usr/local/lib/php') in [sciezka]/login.php on line 48

przy uzyciu header tak nie moze nadpisac head...

Ten post edytował timmy 28.12.2005, 19:39:05
Go to the top of the page
+Quote Post
ens0re
post
Post #9





Grupa: Zarejestrowani
Postów: 143
Pomógł: 0
Dołączył: 23.08.2005
Skąd: Warszawa

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


Za to swoje całe 'include' co tam naskrobałes, wrzuc 'header'... Może nie ma takiego pliku?
Go to the top of the page
+Quote Post

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: 20.12.2025 - 21:59