Uldeens Posted May 27, 2006 Report Share Posted May 27, 2006 (edited) Piemeram man saitam ir mapes http://www.manalapa.lv/augli/ http://www.manalapa.lv/darzeni/ http://www.manalapa.lv/dzerieni/ includes http://www.manalapa.lv/in/ (connect.php , veelkautkas.php) pamatlapa http://www.manalapa.lv/ No pamatlapas izsaucu <? require("in/connect.php"); .... viss iet bet ja es izsaucu so no mapes darzeni <? require("in/connect.php"); .... tad require nestradaa tipa jaizmanto pilnais URL <? require("http://www.manalap.lv/in/connect.php") ... Nav kautkads variablis globaalais lai var izmantot piemeram require("$_SERVER['kautkas']/in/connect.php") Kaa to realizee? Edited May 27, 2006 by Uldeens Link to comment Share on other sites More sharing options...
Klez Posted May 27, 2006 Report Share Posted May 27, 2006 ../ = vienu direktoriju atpakalj require("../in/connect.php"); Link to comment Share on other sites More sharing options...
v3rb0 Posted May 27, 2006 Report Share Posted May 27, 2006 (edited) vienkāršākais variants iekš config.php define('ROOT_DIR','/var/www/'); talāk visos failos pieraksta relatīvo ceļu uz config.php bet citus failus includo ar require(ROOT_DIR.'in/connect.php'); Edited May 27, 2006 by v3rb0 Link to comment Share on other sites More sharing options...
tiy Posted May 27, 2006 Report Share Posted May 27, 2006 (edited) ar ko include atskiras no require? Edited May 27, 2006 by tiy Link to comment Share on other sites More sharing options...
Uldeens Posted May 27, 2006 Author Report Share Posted May 27, 2006 (edited) Tit kautkur lasiiju ka require ir atraaks.. bet nesaku ka taa tochna ir. Bet dara vienu un to pashu . Edited May 27, 2006 by Uldeens Link to comment Share on other sites More sharing options...
GedroX Posted May 27, 2006 Report Share Posted May 27, 2006 RTFM Link to comment Share on other sites More sharing options...
Uldeens Posted May 27, 2006 Author Report Share Posted May 27, 2006 bet ja es lietoju visur pilno URL require("http://manalapa.lv/query.php... Tas nepaleenina pasaakumu ?? Link to comment Share on other sites More sharing options...
GedroX Posted May 27, 2006 Report Share Posted May 27, 2006 require funkcijai ir jāpadod php sistēmas faila ceļš nevis jau izparsētais http variants... lame... Link to comment Share on other sites More sharing options...
Uldeens Posted May 27, 2006 Author Report Share Posted May 27, 2006 a include ? Require("kautkas.php... include("http://www.kautkas.lv/kautkas.php .. ??? Link to comment Share on other sites More sharing options...
GedroX Posted May 27, 2006 Report Share Posted May 27, 2006 (edited) Include un require funkcijas praktiski sakrīt. Atšķirās tikai to "uzvedība", ja fails netiek atrasts. Include izdos warning, bet otrs - error, tātad skripts nomirs. :) P.S. anyway RTFM!!! Edited May 27, 2006 by GedroX Link to comment Share on other sites More sharing options...
Uldeens Posted May 27, 2006 Author Report Share Posted May 27, 2006 Ok.Izlasiishu. Jautajums kada ir starpiba skripta darbiibaa zemak minetajos piemeros? <? require("script.php"); ?> <? require("http://fullURL.lv/script.php"); ?> Link to comment Share on other sites More sharing options...
GedroX Posted May 27, 2006 Report Share Posted May 27, 2006 script.php - php fails - <?php echo "Hello world!" ?> http://... - parsēts php fails - "Hello World!" Link to comment Share on other sites More sharing options...
Uldeens Posted May 27, 2006 Author Report Share Posted May 27, 2006 un? Man tas parseets neko neizsaka :DDDD ... Tas ir garaam ja scriptaa ir <? require("http://fullURL.lv/script.php"); ?> ?? Vai nee ? Link to comment Share on other sites More sharing options...
GedroX Posted May 27, 2006 Report Share Posted May 27, 2006 (edited) Jā, tas ir totāli garām!!! Apmierināts? o_O P.S. Man sāk nedaudz kaitināt uzraksts "Senior Member" zem tava nika. =D Edited May 27, 2006 by GedroX Link to comment Share on other sites More sharing options...
Kavacky Posted May 28, 2006 Report Share Posted May 28, 2006 Tam jau nav jānozīmē überPRO. Tas var būt vienkārši megadaunis. Link to comment Share on other sites More sharing options...
Recommended Posts