Am un script facut de mine care ii in mai multe limbi ( romana, engleza, germana si franceza ) si cand cineva intra pe site si nu are scris in link bucata lang=ro / lang=eng / lang=d / lang=f atunci imi da urmatoarele erori :
Cod: Selectaţi tot
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Warning: include_once(/home/treisute/public_html/silvoproject.ro/lang): failed to open stream: No such file or directory in /home/treisute/public_html/silvoproject.ro/include.php on line 17
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Warning: include_once(): Failed opening '/home/*****/public_html/*****/lang/' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/*****/include.php on line 17
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Notice: in /home/*****/public_html/*****/core/meniu.inc.php on line 15
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Notice: in /home/*****/public_html/*****/core/categorii.inc.php on line 35
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Notice: in /home/*****/public_html/*****/core/index.inc.php on line 13
include.php on line 17
Cod: Selectaţi tot
include_once($locatia."lang/".$filelang[$table_lang]);
Cod: Selectaţi tot
$filelang = array('ro'=>'romana.php', 'eng'=>'engleza.php', 'd'=>'germana.php', 'f'=>'franceza.php');
Cod: Selectaţi tot
if(isset($_GET['lang'])){
$lang = "?lang=".$QuerySetting->convert($_GET['lang']);
$table_lang = $QuerySetting->convert($_GET['lang']);
}else{
$lang = "?lang=eng";
$table_lang = "eng";
}
Cod: Selectaţi tot
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Notice: in /home/treisute/public_html/silvoproject.ro/core/meniu.inc.php on line 15
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Notice: in /home/treisute/public_html/silvoproject.ro/core/categorii.inc.php on line 35
[19-Mar-2014 10:43:21 Europe/Helsinki] PHP Notice: in /home/treisute/public_html/silvoproject.ro/core/index.inc.php on line 13
Acuma vine intrebarea :
Cum trebuie sa fac setarea atunci cand nu-i setat get-ul lang sa-mi serveasca tabelele care sunt in limba, ca de acolo vin si erorile. De la functia if care imi arata ce limba ii setata.
Mersi anticipat .