dear everyone…
i am developing a website that contains 4 folders (gl,gb,kz,eg) each folder related to different country and all the website data are in English language but the difference is in the MySQL query of database to get data according to the country
1) www.example.com/gl/ (Global English version)
2) www.example.com/gb/ (UK version)
3) www.example.com/kz/ (Kazakh version)
4) www.example.com/eg/ (Egyptian version)
i don’t want to add my files to the root of each folder to avoid the headache when changing css or anything in the website…
i dont want to change everything in 4 folders, i want to change only one file and those changes to affect in each folder, i tried to put my files in the root of my project and in each folder i made include to get the data
for example : in gl:
$select_query1 = "SELECT * FROM databaseo where page='about' and lango='gl'";
//print "select_query1: " . $select_query1 . "<br>";
$res_query1 = mysql_query($select_query1)
or die ("table error1: " . mysql_error());
$res_rows1 = mysql_num_rows($res_query1);
//echo $res_rows1;
//$tr_res_query1 = mysql_fetch_array($res_query1);
//or
while ($tr_res_query1 = mysql_fetch_array($res_query1))
{
echo 'result here<br>';
}
include('../about.php');
and in gb
$select_query1 = "SELECT * FROM databaseo where page='about' and lango='gb'";
//print "select_query1: " . $select_query1 . "<br>";
$res_query1 = mysql_query($select_query1)
or die ("table error1: " . mysql_error());
$res_rows1 = mysql_num_rows($res_query1);
//echo $res_rows1;
//$tr_res_query1 = mysql_fetch_array($res_query1);
//or
while ($tr_res_query1 = mysql_fetch_array($res_query1))
{
echo 'result here<br>';
}
include('../about.php');
etc…
but it did not work for me because of difference in paths for *.js files and for folders… any idea???