GeRik Posted August 17, 2009 Report Share Posted August 17, 2009 Ka man ieladet sho visu <? $languages = array('en' => 'English', 'ru' => 'Russian', 'lv' => 'Latvian'); if (isset($_GET['valoda'])) { $lang = $_GET['valoda']; setcookie('valoda', $lang, time()+(3600*24*365)); }else if (isset($_COOKIE['valoda'])) { $lang = $_COOKIE['valoda']; } else { $lang = 'lv'; } if (!(in_array($lang, array_keys($languages)))) { die("ERROR: Trukst Valodas fails!"); } include("valoda/$lang.php"); ?> shada veida <script type="text/javascript"> $(document).ready(function(){ $("#pedreg").load('includes/top5.php'); }); </script> Quote Link to comment Share on other sites More sharing options...
bubu Posted August 17, 2009 Report Share Posted August 17, 2009 Ko tu tur gribi ielādēt? Viens ir php kods, otrs ir javaskripta kods. Tās ir divas dažādas lietas, kodu php sintaksē ar javaskriptu nevar izpildīt. Quote Link to comment Share on other sites More sharing options...
GeRik Posted August 17, 2009 Author Report Share Posted August 17, 2009 zna4it ja ir Javascript ielade zna4it man web lapai bus errori ? jo ja ir javascript ielade katra faila kuru ielade vaig pievienot tadu pashu (lai raditos tulkojums) a ja nav pievienots tad nerada bet ka nomaina valodu visur errorus izmet header already sent un valoda nomainas bet uz nakama linka vairs jau nav ta valoda taka diezgan liela problema kura nevaru iebraukt Quote Link to comment Share on other sites More sharing options...
bubu Posted August 17, 2009 Report Share Posted August 17, 2009 Nekā nesapratu, ko tu pateici. Izsakies skaidrāk - komatu un punktu lietošanu neviens vēl nav aizliedzis. Quote Link to comment Share on other sites More sharing options...
sandrulis Posted August 18, 2009 Report Share Posted August 18, 2009 Tu gibi lai Tew ir lapa ar 3 valodām? Varu varbūt iedot vienu skriptu, kurš darbojas! bet nezinu vai tas ir tas ko Tu vēlies! Quote Link to comment Share on other sites More sharing options...
Indian Posted August 18, 2009 Report Share Posted August 18, 2009 (edited) ja tev piemēram ir index.php: <? $languages = array('en' => 'English', 'ru' => 'Russian', 'lv' => 'Lat... ?> [...] <html><head>... <script type="text/javascript"> $(document).ready(function(){ $("#pedreg").load('includes/top5.php'); }); </script>... tas top5.php skripts ielādēsies atsevišķi, kā jauns pieprasījums bez tā valodas skripta. tātad vai nu dari tā <div id="pedreg"><? include('includes/top5.php');?></div> vai arī liec vēl vienu valodas skripta kopiju tajā top5.php EDIT: tie punktiņi domāti, lai saīsinātu. Edited August 18, 2009 by Indian Quote Link to comment Share on other sites More sharing options...
GeRik Posted August 18, 2009 Author Report Share Posted August 18, 2009 nu bet tur jau ta lieta ka ta kopija izraisa erroru headers already sent Quote Link to comment Share on other sites More sharing options...
Indian Posted August 18, 2009 Report Share Posted August 18, 2009 nu bet tur jau ta lieta ka ta kopija izraisa erroru headers already sent ja tu inkludosi parasti to top5.php, tad erroram nevajag but, ja taja top5.php nav ta skripta kopija. Quote Link to comment Share on other sites More sharing options...
GeRik Posted August 18, 2009 Author Report Share Posted August 18, 2009 bet man vajag ar to ieladi Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.