v3rb0 Posted April 25, 2006 Report Share Posted April 25, 2006 <table> sākumam, visām rindām/cellēm un beigām, bet ne ceļļu saturam, jābūt ir vienā includē. citādi neko no tā visa saprast pats nevarēsi. Link to comment Share on other sites More sharing options...
Visurgaajeejs Posted April 25, 2006 Author Report Share Posted April 25, 2006 Ir gan līki!Uz ātru skatu, kas tev šitas index.php sākumā ir: <? //-----------------------index.php <?php un beigās ?> <? } ?> uz tiem neskaties, tas tur liku kopaa un rakstiiju klaat, nav taksh man viss vienaa failaa. <table> sākumam, visām rindām/cellēm un beigām, bet ne ceļļu saturam, jābūt ir vienā includē. citādi neko no tā visa saprast pats nevarēsi. tad kaa tu ierosini man to paarakstiit, lai buutu saprotams Link to comment Share on other sites More sharing options...
john.brown Posted April 25, 2006 Report Share Posted April 25, 2006 Nu, ok, tas būtu sākumā. Bet beigās aizverošā iekava, kura karājas gaisā? Vispār tam erroru vajadzētu dot. Link to comment Share on other sites More sharing options...
Visurgaajeejs Posted April 25, 2006 Author Report Share Posted April 25, 2006 un apakshaa ir pavisam no citat php faila palicis, kuru gribeeju arii likt augsha.php, taa ka tas ir lieks, bet nu par manu probleemu labaak vareetu ko ieteik. Link to comment Share on other sites More sharing options...
v3rb0 Posted April 25, 2006 Report Share Posted April 25, 2006 tad kaa tu ierosini man to paarakstiit, lai buutu saprotams idejiski kaut kā šitā index.php <table> <tr><td colspan="3"><?php include('header.php');?></td></tr> <tr> <td><?php include('leftmenu.php');?></td> <td><?php include('content.php');?></td> <td><?php include('rightmenu.php');?></td> </tr> <tr><td colspan="3"><?php include('footer.php');?></td></tr> </table> nevis <table> sākas vienā failā un beidzās citā. Link to comment Share on other sites More sharing options...
john.brown Posted April 25, 2006 Report Share Posted April 25, 2006 (edited) if (in_array($_GET['menu'], $allow)) { .... } Acīm redzot tev register_globals ir off, kas ir labi. Tik tad pa priekš vai nu tam $menu piešķir atbilstošu $_GET vērtību, vai izmanto $_GET['menu'] Un uzlic sākumā error_reporting(E_ALL), tas tev uzreiz pateiktu: undefined variable $menu in includes.php line... Edited April 25, 2006 by john.brown Link to comment Share on other sites More sharing options...
Visurgaajeejs Posted April 26, 2006 Author Report Share Posted April 26, 2006 Kaapeec man nekas nekas nenostraadaa index.php lapaa ir inkluuds uz failu: <td bgcolor="#ffffff" valign="top" width="350"><?php include('file/includes.php'); ?></td> mapee includes ir php faili albums.php, u.c. includes.php: <?php $menu = $_GET['menu']; $allow = array('albums','viesu_gr', 'saites', 'aptaujas'); $file = 'index.php'; if (isset($_GET['menu'])){ if (in_array($menu, $allow)){ $file = $menu.'.php'; require_once('file/includes/'.$file);} } ?> taapat vinsh man nenomaina lapas saturu. Link to comment Share on other sites More sharing options...
john.brown Posted April 26, 2006 Report Share Posted April 26, 2006 (edited) <?php error_reporting(E_ALL); $menu = isset($_GET['menu'])? $_GET['menu'] : ''; $allow = array('albums','viesu_gr', 'saites', 'aptaujas'); $file = 'index.php'; if (in_array($menu, $allow)) $file = $menu.'.php'; else echo 'Ar mainigo menu nav kas labi:'.$menu; require_once('file/includes/'.$file); ?> Edited April 26, 2006 by john.brown Link to comment Share on other sites More sharing options...
Recommended Posts