• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

is there a getRealPath like java servlets in PHP

Hello,
in a java servlet there is a command
where application.getRealPath("/") would equal your phyical doc root in my case it is
/home/domain/html is the real path for http://www.mydomain.com/

does php have a similar kind of function?

thanks
Randy
0
paries
Asked:
paries
1 Solution
 
Roger BaklundCommented:
You could use getcwd():

http://php.net/manual/en/function.getcwd.php

getcwd() returns the path to the current script, $_SERVER['DOCUMENT_ROOT'] contains the path to the web server root.
0
 
Kiran Paul VJComputer EngineerCommented:
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now