sairfan1 Posted August 22, 2010 Share Posted August 22, 2010 hi, how can i get home directory path?? for example D:\Inetpub\wwwroot\ is the home directory, i want to call a function from D:\Inetpub\wwwroot\web1\basic\ path and it should return home directory returned value should not include "\web1\basic" as its after home directory i need only root path of home directory Link to comment Share on other sites More sharing options...
Synook Posted August 22, 2010 Share Posted August 22, 2010 $_SERVER['DOCUMENT_ROOT'] Link to comment Share on other sites More sharing options...
sairfan1 Posted August 22, 2010 Author Share Posted August 22, 2010 $_SERVER['DOCUMENT_ROOT']it work on apache server, im using php5 on windows plate form. regards Link to comment Share on other sites More sharing options...
boen_robot Posted August 22, 2010 Share Posted August 22, 2010 You can specify it in php.ini. There's a "doc_root" setting there.BTW, the word is "platform", not "plate form". Link to comment Share on other sites More sharing options...
HungryMind Posted August 22, 2010 Share Posted August 22, 2010 Hi!Try This CODE And Find Which One U Want To Use. foreach($_SERVER as $key_name => $key_value) { print $key_name . " = " . $key_value . "<br>";} Link to comment Share on other sites More sharing options...
sairfan1 Posted August 26, 2010 Author Share Posted August 26, 2010 Hi!Try This CODE And Find Which One U Want To Use.foreach($_SERVER as $key_name => $key_value) { print $key_name . " = " . $key_value . "<br>";} non of this have root directory path, Link to comment Share on other sites More sharing options...
justsomeguy Posted August 26, 2010 Share Posted August 26, 2010 Did you define the doc root in php.ini? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.