capsx Posted May 26, 2008 Report Share Posted May 26, 2008 (edited) tauta - kaa juus raxtat DEFINE('ROOT', '/www/htdocs/'); //vai DEFINE('ROOT', '/www/htdocs'); liidzarko sanaak require_once(ROOT.'base_functions.php'); //vai require_once(ROOT.'/base_functions.php'); any commenc ??? Edited May 26, 2008 by capsx Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 26, 2008 Report Share Posted May 26, 2008 a kaa pareizaak rakstiit 2+3=6 3+2=6 ???? IMHO starpiibas nekaadas... Link to comment Share on other sites More sharing options...
capsx Posted May 26, 2008 Author Report Share Posted May 26, 2008 labi - kaa ir pienhemc peec standarteim, ja taac vispaar ir p.s. starpiiba rodas ja ROOT netiek nodefineec ;) Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 26, 2008 Report Share Posted May 26, 2008 (edited) p.s. starpiiba rodas ja ROOT netiek nodefineec ;) tad buus Errors i viss .... P.S. bet vispar skjiet kaa optimalak buutu tas pirmais variants ... --> mazliet elastiigaaks kods.... Edited May 26, 2008 by Grey_Wolf Link to comment Share on other sites More sharing options...
capsx Posted May 26, 2008 Author Report Share Posted May 26, 2008 nu man kopsh iesaakumiem tika lietots 2ais varianc, doma ir pariet labaak uz 1o variantu, jo tad var redzeet, as ir fails un kas ir mape naaksies tik pieshauties un biki fcijas paurkheet p.s. kapeec elastiigaaks ? p.s.s. nu ja 1ajaa variantaa root nebus un ja tajaa pashaa diraa buus base_functions.php tad jams tik ieklahuts, 2ajaa variantaa tiks vispirms klauveets uz / Link to comment Share on other sites More sharing options...
andrisp Posted May 26, 2008 Report Share Posted May 26, 2008 Jā, pirmais variants "labāks". Piem., ja izmantojot otro variantu ROOT ir /, tad galā ceļi sanāks //blabla.php (strādās, bet nav diezko pareizi). Link to comment Share on other sites More sharing options...
PheliX Posted May 26, 2008 Report Share Posted May 26, 2008 Es evolūcijas ceļā esu nonācis pie otrā varianta, bet principā jau galvenais pieturēties pie viena principa, lai nav jādomā kur ir un kur nav jāliek tas slash :) Link to comment Share on other sites More sharing options...
capsx Posted May 26, 2008 Author Report Share Posted May 26, 2008 (edited) Jā, pirmais variants "labāks". Piem., ja izmantojot otro variantu ROOT ir /, tad galā ceļi sanāks //blabla.php (strādās, bet nav diezko pareizi). ja ROOT ir '/' tad taisa: DEFINE( 'ROOT' , '' ) Edited May 26, 2008 by capsx Link to comment Share on other sites More sharing options...
capsx Posted May 26, 2008 Author Report Share Posted May 26, 2008 (edited) Es evolūcijas ceļā esu nonācis pie otrā varianta, bet principā jau galvenais pieturēties pie viena principa, lai nav jādomā kur ir un kur nav jāliek tas slash :) kapeec nonaaci pie 2aa varianta ? any argumenti ? mans arguments par 1o variantu ir, kaa jau mineeju, ka var redzeet: ROOT . 'file/' <- direktorija ROOT . 'file' <- fails ar 2o variantu sanaak: ROOT . '/file' <- direktorija ROOT . '/file' <- fails Edited May 26, 2008 by capsx Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 26, 2008 Report Share Posted May 26, 2008 ROOT . 'file/' <- direktorijaROOT . 'file' <- fails IMHO --> ROOT vajadzeetu buut vienmer direktorijai... Link to comment Share on other sites More sharing options...
capsx Posted May 26, 2008 Author Report Share Posted May 26, 2008 IMHO --> ROOT vajadzeetu buut vienmer direktorijai... runa iet par "file" - vai tas ir fails vai direktorija Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 26, 2008 Report Share Posted May 26, 2008 runa iet par "file" - vai tas ir fails vai direktorija jaa mazliet parpratu :( bet nu tam ja vairs tad nav sakara ar pashu topica jautajumu ... jo abos gadijumos atskjirsies tikai 2 dalja .... tb klaat naks ( / ) Link to comment Share on other sites More sharing options...
capsx Posted May 26, 2008 Author Report Share Posted May 26, 2008 jaa mazliet parpratu :(bet nu tam ja vairs tad nav sakara ar pashu topica jautajumu ... jo abos gadijumos atskjirsies tikai 2 dalja .... tb klaat naks ( / ) nu par to 2o dalhu jau ir pati saals ;) gribas palikt pie vecaa 2aa, bet praats saka, ka pareizaak buutu tomeer 1o :) jaaiet (smoke) :D Link to comment Share on other sites More sharing options...
martins256 Posted May 26, 2008 Report Share Posted May 26, 2008 Kāds varbūt izmanto arī DIRECTORY_SEPARATOR '/' vietā ? Link to comment Share on other sites More sharing options...
andrisp Posted May 26, 2008 Report Share Posted May 26, 2008 martins256, ņemot vērā, ka php lieliski tiek galā gan ar /, \, tad pilnībā neredzu jēgu no tāda. Link to comment Share on other sites More sharing options...
Recommended Posts