Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Location na serwerze
Crash89
post
Post #1





Grupa: Zarejestrowani
Postów: 191
Pomógł: 7
Dołączył: 3.04.2013

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


Jak na serwerze skorzystać z funkcji header

Mam prostą stronę gdzie chce skorzystać z funkcji header gdzie chcę przekierować stronę na inną stronę w projekcie:

lokalnie działa coś takiego:

  1. header("Location: index_en.php")


natomiast na serwerze próbowałem róznych sposobów łącznie z __DIR__
takie coś zwraca nulla:
  1. header("Location: " . __DIR__ . "index_en.php")


pozdrawiam

Ten post edytował Crash89 14.10.2018, 14:58:06
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Pyton_000
post
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


Raz dajesz

Kod
Location: index_en.php

a raz

Kod
'index.php?language=pl'

Go to the top of the page
+Quote Post
Crash89
post
Post #3





Grupa: Zarejestrowani
Postów: 191
Pomógł: 7
Dołączył: 3.04.2013

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


Cytat(Pyton_000 @ 16.10.2018, 15:52:28 ) *
Raz dajesz

Kod
Location: index_en.php

a raz

Kod
'index.php?language=pl'


To jest chyba skopiowane z pliku index_en.php

Taki mam komunikat:
  1. Warning: Cannot modify header information - headers already sent by (output started at /home/p/ftp/F/index.php:2) in /home/p/ftp/F/index.php on line 11


Ten post edytował Crash89 16.10.2018, 19:09:07
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: 7.10.2025 - 13:35