Jump to content
php.lv forumi

Recommended Posts

Posted

$BASE - tiek kaut kur inicializets?

Posted (edited)

Jā, bet mainiju arī BASE pret prastu adresi. Nekā

 

Hmm dīviani

		 echo "<meta http-equiv=\"Refresh\" content=\"0;url=/index.php\">";
	die('abc');

 

viss iet.

Edited by anonīms
Posted

shim ifam jegas nav, pietikshu ar sho te $_LANG = $_REQUEST['lang'];

 

  if($_REQUEST['lang'] == "lv" OR $_REQUEST['lang'] == "en" OR $_REQUEST['lang'] == "ru" OR $_REQUEST['lang'] == "ee" OR $_REQUEST['lang'] == "lt"){
		$_LANG = $_REQUEST['lang'];
	} else {
		$_LANG = "en";
	}

 

echo "<meta http-equiv=\"Refresh\" content=\"0;url=".$BASE."\">"; aizvieto ar header("location: $url");

Posted (edited)

header jau arī mēģināju.

Pārlabošu kodu...

 

ieliekot header valodu maiņa vispār nestrādā.

 

header('location: index.php');

šādi iet

header('location: /index.php');

šādi nē.

Edited by anonīms
Posted
header('location: ./index.php');//vai shadi ies?

Posted

Met tā

/lang/en/index.php

 

un vēl.

 

kā ierakstu header tā valodas nestrādā (ru tikai ir, bet nesaprotu kapēc, jo kā def taču ir en)

aizkomentēju ciet header (//) un viss iet.

Posted

sry, par dubulto, bet atradu kļūdu.

 

Tātad nomainu valodu un man nerefreshojas un paliek uz /lang/ee/, tad viss ir ok.

Tikko kā aizej uz / vai jebkuru citu lapu, tā atkal ir defaultā valoda (en).

 

Aizgāju paskatīties cepumus, man tur viņi ir daudz. Vai tā tam ir jābūt vai arī tikai vienam cepumam?

Katrs cepums ar savu saturu (en, lv, lt, u.t.t..)

un ceļš ir /lang/lt/ /lv/ u.c..

 

Vai tā ir jābūt, ka ir vairāki cepumi ar vienādu nosaukumu?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...