vitao.web Posted September 2, 2010 Report Share Posted September 2, 2010 Labdien! Ceru, ka spēsiet man kaut kā palīdzēt! Tātad ir sekojošas lietas: $includes: $includes = array( 'home' => 'content/main.php', 'news' => 'content/news.php', 'events' => 'content/events.php', 'gallery' => 'content/gallery.php', 'about' => 'content/about.php', 'staff' => 'content/staff.php', 'links' => 'content/links.php', 'contact' => 'content/contact.php', 'readmore'=> 'content/readmore.php', ); Tad ar šo lietu es viņas izvelku: <?php if (isset($cat) && isset($includes["$cat"])) { if(!@include($includes["$cat"])) { require('content/main.php'); } } else { require('content/main.php'); } ?> Adreses ir: ?cat=news uttt Viss strādā kedā, līdz brīdim, kad vēlos izdabūt readmmore.php.. 1.orginals, ka tagad ir <a class='link' title='".$rez['title']."' href=readmore.php?id=".$rez['id']."&cat=".$rez['cat']."> 2. variants ka meginaju (nestrada) <a class='link' title='".$rez['title']."' href=?cat=readmore?id=".$rez['id']."&cat=".$rez['cat']."> Tad lūk cerēju, ka ieteiksiet, kur kļuda vai arī kā sataisīt šo lietu, ko vēlos. Paldies! ar cieņu, vitao.web Quote Link to comment Share on other sites More sharing options...
codez Posted September 2, 2010 Report Share Posted September 2, 2010 varbūt aiz href pēdiņas. Un vispār MVC. Quote Link to comment Share on other sites More sharing options...
vitao.web Posted September 2, 2010 Author Report Share Posted September 2, 2010 (edited) Ne ar pēdiņām nav tur sakara.... vnk adrese parasti bija readmore.php?cat=new&id5 a tagad ar to ?cat=readmore(talak links ) ir problemas... tavs links ir interesants, bet šoreiz vēlos pabeigts ar šo pašu :) Edited September 2, 2010 by vitao.web Quote Link to comment Share on other sites More sharing options...
indoom Posted September 2, 2010 Report Share Posted September 2, 2010 (edited) ./?cat=readmore&id=... Edited September 2, 2010 by indoom Quote Link to comment Share on other sites More sharing options...
Kverkagambo Posted September 2, 2010 Report Share Posted September 2, 2010 (edited) Ja tev visas tās pārbaudes atrodas index.php, jāraksta <a href="index.php?cat=readmore"></a>. Un neaizmirsti iepriekš $cat=$_GET['cat'];, tas nenotiek automātiski. Edited September 2, 2010 by Kverkagambo Quote Link to comment Share on other sites More sharing options...
vitao.web Posted September 3, 2010 Author Report Share Posted September 3, 2010 Ja tev visas tās pārbaudes atrodas index.php, jāraksta <a href="index.php?cat=readmore"></a>. Un neaizmirsti iepriekš $cat=$_GET['cat'];, tas nenotiek automātiski. proveju nav :( Quote Link to comment Share on other sites More sharing options...
Леший Posted September 3, 2010 Report Share Posted September 3, 2010 Samaini ?cat=readmore?id= pret ?cat=readmore&id= Quote Link to comment Share on other sites More sharing options...
vitao.web Posted September 3, 2010 Author Report Share Posted September 3, 2010 paslaik man ir šādi href='?cat=readmore&id=".$rez['id']."&cat=".$rez['cat']."' Pārlukā ja uzspiez uz readmore paradas : /?cat=readmore&id=5&cat=news Bet nekas netiek ieladets :( Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted September 3, 2010 Report Share Posted September 3, 2010 Tak debugo, mēs minot, par tevi ātrāk problēmu neatradīsim. <?php echo 'cat='.$cat; if (isset($cat) && isset($includes["$cat"])) {echo 1; if(!@include($includes["$cat"])) {echo 2; require('content/main.php'); } } else {echo 3; require('content/main.php'); } ?> Tāda raķešu zinātne!!!111 Quote Link to comment Share on other sites More sharing options...
indoom Posted September 3, 2010 Report Share Posted September 3, 2010 paslaik man ir šādi href='?cat=readmore&id=".$rez['id']."&cat=".$rez['cat']."' Kāpēc divreiz cat? 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.