Atomz Posted May 8, 2007 Report Share Posted May 8, 2007 Nu vot man ir tada problema, ka nezinu ka lai uztaisa shita fii4i! Piemēram, man ir navigācija! HOME NEWS SOFT nedaudz zemaak ir kods: <?php include("home_teksts.txt"); ?> ka lai uztaisa lai nospiezot linku NEWS pamaina include kodaa no home_teksts.txt uz news_teksts.txt Link to comment Share on other sites More sharing options...
Kavacky Posted May 8, 2007 Report Share Posted May 8, 2007 Par if vai case esi kaut ko dzirdējis? Link to comment Share on other sites More sharing options...
Atomz Posted May 8, 2007 Author Report Share Posted May 8, 2007 (edited) Emmmm....Nēsu! Es šaja nomā gandrīz tikpatkā amalfabēts! Edited May 8, 2007 by Atomz Link to comment Share on other sites More sharing options...
andrisp Posted May 8, 2007 Report Share Posted May 8, 2007 Nu tad manuāli vaļā. Vai arii http://webtech.lv/rakstu-darbi/php-reference/ Link to comment Share on other sites More sharing options...
aldis Posted May 8, 2007 Report Share Posted May 8, 2007 (edited) Atomz.. pamegini shitaa linkus dot... piemeram news linkam iedo shitadu adresi... http://adrese.lv/index.php?id=news un softiem iedo http://adrese.lv/index.php?id=softs koda gabalam apmeram shadam jabuut... <?php //izmetat pa sadaljam... if ($_GET['id'] == news) include("home_news.txt"); if ($_GET['id'] == softs) include("home_softs.txt"); //un ja tikai iedod bez nekadiem id bet shitaa http://adrese.lv/ vai http://adrese.lv/index.php if (!empty($_GET['id'])) include("home_teksts.txt"); ?> Edited May 9, 2007 by aldis Link to comment Share on other sites More sharing options...
andrisp Posted May 9, 2007 Report Share Posted May 9, 2007 aldis, stringi jāliek pēdiņās. Link to comment Share on other sites More sharing options...
v3rb0 Posted May 9, 2007 Report Share Posted May 9, 2007 tiem kas taisa bez noticēm tās pēdas ir vienalga, tāpat kā vispār vispirms pārbaudīt vai $_GET['id'] ir. un pēdējajam ifam vajadzētu izpildīties tad, kad id tieši ir padots, nevis tā kā kometāros. if(!isset($_GET['id']) || !in_array($_GET['id'], array('news','home','soft')) $_GET['id'] = 'defaultais'; include($_GET['id'].'.txt'); Link to comment Share on other sites More sharing options...
aldis Posted May 10, 2007 Report Share Posted May 10, 2007 nu jaa.. veel iisaakos celjus dizhi neesmu apguvis! :( un par taam peedinjaam.. labi ka pateici, njemshu veeraa! vnk.. man kodaa nebija nekadi errori deelj taa! taapee arii liku :D Link to comment Share on other sites More sharing options...
andrisp Posted May 10, 2007 Report Share Posted May 10, 2007 aldis, tad ieslēdz notices un varēsi brīnīties, ko tev kods droši vien spļaus acīs :). Link to comment Share on other sites More sharing options...
Recommended Posts