Praktikants Posted July 29, 2007 Report Share Posted July 29, 2007 Kaut kas iekš šim rindām nestrādā if ($_GET['page']) { $page = $_GET['page'] . '.txt'; } else { $page = 'home.txt'; } if (file_exists("pages/$page")) { include("pages/$page"); } else { echo("<h1 align=\"center\">Page cannot be found</h1>\n"); } tikai kas man nav nojausmas! Jo vienīgais kas no tā strādā ir Page cannot be found! :D Link to comment Share on other sites More sharing options...
bubu Posted July 29, 2007 Report Share Posted July 29, 2007 Viss ir ļoti skaidrs, kas nestrādā - fails pages/$page neeksistē. Kur problēma? Link to comment Share on other sites More sharing options...
Praktikants Posted July 29, 2007 Author Report Share Posted July 29, 2007 Nu tur jau tā lieta ka ir gan pages/$page , bet vienīgais kas nostrādā ir ka viņš pasaka nav nekādu .txt failu! bet ir gan direktorija speciāli txt failiem, gan faili iekšā... Link to comment Share on other sites More sharing options...
bubu Posted July 29, 2007 Report Share Posted July 29, 2007 Kā tu to zini? Mēģināji echo "pages/$page"; ? Tiešām ir? Es tev neticu. Manuprāt tu te mūs gribi apmānīt! Link to comment Share on other sites More sharing options...
Delfins Posted July 29, 2007 Report Share Posted July 29, 2007 Neticu! Link to comment Share on other sites More sharing options...
hackerman Posted July 29, 2007 Report Share Posted July 29, 2007 (edited) Man tas kods šancē. P.S. Lieto paste.php.lv vai vismaz code tagus! Edited July 29, 2007 by hackerman Link to comment Share on other sites More sharing options...
Praktikants Posted July 29, 2007 Author Report Share Posted July 29, 2007 idzruka tikai pages/ bet tur ieksa ir faili nu jau kadi 6 gab un visi .txt tuksi(0KB) un pilni(8KB) Link to comment Share on other sites More sharing options...
bubu Posted July 29, 2007 Report Share Posted July 29, 2007 Nu un ka ir iekšā. Tam tak nav nekāda sakara ar to, kādas vērtības tu php kodā piešķir $page mainīgajam. Redz kā, es pareizi teicu - tu mūs sākumā gribēji piemānīt, sakot, ka nav nekādu txt failu. Tu nemaz txt failus nemeklē, tu tukšu stringu meklēji. Link to comment Share on other sites More sharing options...
Recommended Posts