Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Wielojezycznosc strony
zabolek
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 21.05.2010

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


witam mam problem mam kod


  1. if(!isset($_SESSION['lang']) && trim($_GET['lang']) == '') {
  2. $_SESSION['lang'] = 'polish';
  3. include('language/polish/index.php');
  4. } else {
  5. $_SESSION['lang'] = $_GET['lang'];
  6. include('language/'.$_SESSION['lang'].'/index.php');
  7. }


i po odswiezeniu strony jak sie pokaze lang to wywala mi to


  1. Warning: include(language//index.php) [function.include]: failed to open stream: No such file or directory in include/functions.php on line 9
  2.  
  3. Warning: include() [function.include]: Failed opening 'language//index.php' for inclusion (include_path='.:/usr/local/lib/php') in include/functions.php on line 9



tak jak by nie mogl go zapamietac (IMG:style_emoticons/default/sad.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
zend
post
Post #2





Grupa: Zarejestrowani
Postów: 580
Pomógł: 85
Dołączył: 25.03.2010
Skąd: Skrzyszów :)

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


  1. include('language/'. (isset($_SESSION['lang']) ? 'domyslny jezyk' : $_SESSION['lang'] ).'/index.php');
taka konstrukcja uwolni to od błędów i jeszcze zrób to co napisał przedmówca (IMG:style_emoticons/default/smile.gif)

Ten post edytował zend 26.05.2010, 09:56:31
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: 5.10.2025 - 21:03