jauninjais Posted August 22, 2006 Report Share Posted August 22, 2006 (edited) sveicinaati, meegjinaaju apspriest sho teemu php kanaalaa, bet tomeer pie gala meerkja netiku. taatad ir navigaacijas menu fails: nav.php kursh izskataas apmeeram shaadi: <? if(!isset($nocss)) { include('js_css.php'); } ?> taalaak html kods ar li(-jiem) un ul(-iem) taalaak fails js_css.php te visi tie uztsaadiijumi un visbeidzot karte.php <? $nocss = true; include ('nav.php'); ?> Tagad ar shiem failiem ljoti smuki veidojas, ga navigaacijas menu, gan arii lapas karte. Ja atveru nav.php - navigaacijas menu ja atveru karte.php - lapas karte tagad probleema, gan lapas karti, gan lieku galvenajaa failaa index.php, kur ar <? include 'nav.php'; ?> paraadu navigaacijas menu; un veelaak ar shaadu kodu paraadu lapas karti: logojos db, izveelos db $qry2="SELECT `teksts` FROM sadala2 where 1=1"; case 'lapaskarte': include 'karte.php'; $qry2 .= " AND sadala='tukshs'"; break; karte.php atseviskji paraadaas normaali, bet kad tas ir jau failaa index.php?sadala=lapaskarte paraadaas tas pats nav.php. vai ir kaada izeja no shiis situaacijas? Edited August 22, 2006 by jauninjais Link to comment Share on other sites More sharing options...
blackhalt Posted August 22, 2006 Report Share Posted August 22, 2006 divreiz inklūdojas. karte.php ir nav.php index.php ir nav.php, kurā jau ir karte.php ja ir index.php?sadala=lapaskarte, tad index.php inklūdo nav.php, kurā jau ir karte.php un velreiz karte.php Putra īsāksakot imho. http://lv.php.net/manual/en/function.include-once.php Link to comment Share on other sites More sharing options...
jauninjais Posted August 23, 2006 Author Report Share Posted August 23, 2006 (edited) es meegjinaaju jau shaadi likt tajaa nav.php failaa: <? if(!isset($nocss)) { include_once('js_css.php'); } ?> bet nekas nemainaas. ja es index.php raxtu <? include('nav.php'); teksts include('karte.php'); ?> man paraada vnk nav.php Edited August 23, 2006 by jauninjais Link to comment Share on other sites More sharing options...
Paulinjsh Posted August 23, 2006 Report Share Posted August 23, 2006 Kļūda loģikā, apdomā visu savu putru un sāc no gala. Link to comment Share on other sites More sharing options...
jauninjais Posted August 23, 2006 Author Report Share Posted August 23, 2006 vai ir veel kaadas iespeejas neparaadiit kaadu koda dalju? Link to comment Share on other sites More sharing options...
Paulinjsh Posted August 23, 2006 Report Share Posted August 23, 2006 Apdomā vēlreiz savu kodu kā jau teicu! Link to comment Share on other sites More sharing options...
Recommended Posts