Klokjis Posted August 6, 2005 Report Share Posted August 6, 2005 Lapaa ir 1 apakshfolderis un tajaa apakshfolderii ir fails kuraa vajag kaut ko includot no foldera kas ir 1 pakaapi augstaak. Iznaak ka jaaraxta ' ../ ' kjipa taa: include('../fails.php'); ?! bet beigaas tiek izmesti pazinjojumi, ka taads fails nepastaav. Link to comment Share on other sites More sharing options...
bubu Posted August 6, 2005 Report Share Posted August 6, 2005 (edited) Vai tas fails, kurā ir tā include netiek pats inkludots citā failā, kurš neatrodas ar viņu vienā direktorijā? P.S. iemācies nosaukt topikus sakarīgāk. Edited August 6, 2005 by bubu Link to comment Share on other sites More sharing options...
Robis Posted August 6, 2005 Report Share Posted August 6, 2005 Iesaku lietot uz include vienmēr tikai pilnus ceļus, vai arī ./ kā root un tad lipini klāt attiecīgos. Link to comment Share on other sites More sharing options...
Klokjis Posted August 7, 2005 Author Report Share Posted August 7, 2005 jaa iznaak ka includo includotajaa failaa... kjipa naak index.php, kuraa includo failu xxx.php kursh atrodas apashfolderii... un failaa xxx.php vajag includot failu (pienjemsim) abc.php, kursh atrodas tur pat kur index.php, kjipa 1 folderi back. PS.: Topica nosaukums taads ir prikola peec, jo vienam bija - vairaaki jautaajumi :rolleyes: Link to comment Share on other sites More sharing options...
bubu Posted August 7, 2005 Report Share Posted August 7, 2005 Tad jau viss skaidrs. Relatīvais ceļš, kas tiek norādīts include/require tiek ņemts no tā foldera, kurā atrodas oriģinālais php skripts, no kura sākušās visas tās includes. Link to comment Share on other sites More sharing options...
Klez Posted August 7, 2005 Report Share Posted August 7, 2005 (edited) par include .... /home/mana_www_lapa/html/index.php <- shis ir web root lapi /home/mana_www_lapa/html/includes/ <- sheit buus include faili /home/mana_www_lapa/slepenie_faili/ <- sheit buus include faili /home/mana_www_lapa/html/index.php Saturs: include("./includes/fails.php") // viss straadaa jauki include("../slepenie_faili/fails.php") // atgriezh error, jo PHP direktoriju slepenie_faili neatrod. PHP redz visu , kas ir aiz /home/mana_www_lapa/[b]html[/b]/ /home/mana_www_lapa/html/slepenie_faili/ <- sheit buus include faili /home/mana_www_lapa/html/index/index.php <- sheit buus indeks lapai /home/mana_www_lapa/html/index/index.php Saturs: include("../slepenie_faili/fails.php") // viss jauki straadaa man include Edited August 7, 2005 by Klez Link to comment Share on other sites More sharing options...
Recommended Posts