armins77 Posted April 4, 2010 Report Share Posted April 4, 2010 Kā var uztaisīt linku, lai tas nav adrese.lv/links.php, bet ir adrese.lv/index.lv?page=links. Quote Link to comment Share on other sites More sharing options...
chizijs Posted April 4, 2010 Report Share Posted April 4, 2010 if(isset($_GET['page'])){ $lapa = "/lapas/".$_GET['page'].".php"; if(file_exists($lapa)){ include_once($lapa); } }else{ echo "default_lapa"; } Quote Link to comment Share on other sites More sharing options...
armins77 Posted April 4, 2010 Author Report Share Posted April 4, 2010 Nu, tagad nedaudz saprotamāk. :) Bet kā to pareizi ievietot ja man ir index.php, kā tādā veidā uztaisīt citu lapu, lai būtu tads links kā minēju? Quote Link to comment Share on other sites More sharing options...
m8t Posted April 4, 2010 Report Share Posted April 4, 2010 if(isset($_GET['page'])){ $lapa = "/lapas/".$_GET['page'].".php"; if(file_exists($lapa)){ include_once($lapa); } }else{ echo "default_lapa"; } Chizijs tev jau visu parādīja priekšā. Uztaisi folderi lapas un viņā ieliec iekšā lapa.php ark autkādu saturu, tad ieej savā idex failā ar savu linku un viss ies Quote Link to comment Share on other sites More sharing options...
armins77 Posted April 4, 2010 Author Report Share Posted April 4, 2010 Nu ja man index.php ir šāds, bet viņš to lapu neatver, ja man folderī(page) ir fails bani.php. Ko es tad daru nepareizi? Quote Link to comment Share on other sites More sharing options...
chizijs Posted April 4, 2010 Report Share Posted April 4, 2010 (edited) Ieliec visus savus jaunuma kodus iekš news.php un viņu vietā liec šo kodu <?php if(isset($_GET['page'])){ $lapa = "/page/".$_GET['page'].".php"; if(file_exists($lapa)){ include_once($lapa); } }else{ include_once("news.php"); } ?> Edited April 4, 2010 by chizijs Quote Link to comment Share on other sites More sharing options...
armins77 Posted April 4, 2010 Author Report Share Posted April 4, 2010 Nu īsti nesaprotu, kurās vietās man tas kods jaliek. :( Quote Link to comment Share on other sites More sharing options...
Kemito Posted April 4, 2010 Report Share Posted April 4, 2010 JEL dievs palīdzi šiem! Tagad saproptu no kurienes 2easy kļūst šajā forumā par SPAM MASTER :D 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.