TurboSasa Posted September 17, 2005 Report Share Posted September 17, 2005 Situaacija taada ka man ir kaadas 6 lapas kur apkaart ir vinaada infa bet centraa cita, taatad man vajadzeetu izmantot include lai tanii centraalajaa tabulaa ievietotu kaadu infu kaadu man vajag, jautajums taads kaa man to izdariit, veelams ar uzskataamu piemeeru paradiit kas un kaa. Link to comment Share on other sites More sharing options...
Vebers Posted September 17, 2005 Report Share Posted September 17, 2005 // shei seko viss HTML kods <html> <head> .... //inkluudojam centra koda lapu require('lapa.html'); //turpinam nobeidzam vienaado kodu.. ... </body> </html> Link to comment Share on other sites More sharing options...
TurboSasa Posted September 17, 2005 Author Report Share Posted September 17, 2005 bet ja grib spiest uz linkiem un lai tie arii inkludijas tanii centraalajaa tabulaa kaa tad? Link to comment Share on other sites More sharing options...
Vebers Posted September 17, 2005 Report Share Posted September 17, 2005 // shei seko viss HTML kods <html> <head> .... <a href="lapa.php?include=1">Lapa 1</a> <a href="lapa.php?include=2">Lapa 2</a> <a href="lapa.php?include=3">Lapa 3</a> //inkluudojam centra koda lapu if($include==1){ require('lapa_1.html'); } else if($include==2'){ require('lapa_2.html); } else { require('lapa_1.html'); // šis ir tāpēc, ja nav dots $include vins inclūdos lapa_1.html } //turpinam nobeidzam vienaado kodu.. ... </body> </html> Link to comment Share on other sites More sharing options...
Klokjis Posted September 17, 2005 Report Share Posted September 17, 2005 Vai arii ja vairaak tad var nelietot if bet gan switch: <? switch($_GET['id']) { case 'aaa': include('fails1.php'); break; case 'bbb': include('fails2.php'); break; default: include('fails1.php'); break; }; ?> <a href='?id=aaa'>Fails1</a> <a href='?id=bbb'>Fails2</a> Link to comment Share on other sites More sharing options...
nemec Posted September 17, 2005 Report Share Posted September 17, 2005 <a href="lapa.php?in=1">Lapa 1</a> <a href="lapa.php?in=2">Lapa 2</a> <a href="lapa.php?in=3">Lapa 3</a> <? if (isset ($_GET['in'])) {$sa=$_GET['in']; include "lapa_".$sa.".php";} ?> Link to comment Share on other sites More sharing options...
TurboSasa Posted September 17, 2005 Author Report Share Posted September 17, 2005 (edited) incluudes es taakaa tagad sapratu bet kaa man panaakt lai no incluudes inkluudeejamais fails inkuudeetos centraalakaa tabulaa: ---------------------------- |.................................| ---------------------------- -----.----------------.----- |....| |. include......| |...| |....| |. ejamie......| |....| |....| |..................| |....| |....| |.fali.............| |....| -----.---------------.----- --------------------------- |................................| --------------------------- ja var saprast tad taa ir tabulu sheemaa kaa ir manaa lapaa un kur rakstiits, tur ir jaainkuudee. (ceru ka to sheemu var saprast) Edited September 17, 2005 by TurboSasa Link to comment Share on other sites More sharing options...
nemec Posted September 17, 2005 Report Share Posted September 17, 2005 <table><tr><td colspan="2">augsha</td></tr> <tr><td><a href="lapa.php?in=1">Lapa 1</a><br> <a href="lapa.php?in=2">Lapa 2</a><br> <a href="lapa.php?in=3">Lapa 3</a><br></td></tr> <td> <? if (isset ($_GET['in'])) {$sa=$_GET['in']; include "lapa_".$sa.".php";} ?> </td></tr></table> Link to comment Share on other sites More sharing options...
TurboSasa Posted September 17, 2005 Author Report Share Posted September 17, 2005 cik sapratu kur ir ahref'i tur ir menu tabula, bet kur ir GET tur ir taa tabula kuraa incluudeesies. sapratu pareizi. Link to comment Share on other sites More sharing options...
nemec Posted September 17, 2005 Report Share Posted September 17, 2005 ja tu ar mani runaa, tad jaa. aizmirsu vinjam pierakstiit veel vienu kolonnu tikai... a ko vinjsh taadus jautaajumus te uzdod... lai lasa graamatas Link to comment Share on other sites More sharing options...
Recommended Posts