I can get the current directory with getcwd() but I'd like to know if there's a similar function to get the web application's root directory?
For instance, a getcwd() call would return the following:
That's when getcwd() is executed in a file within that "reporter" folder. But I'm more interested in retrieving the following:/home/jorge/release/project/webapp/controller/reporter
The above is is my web application's home directory./home/jorge/release/project/webapp
I really don't want to hard code any path strings here. Any hints? Am I missing a function to give me what I want?
Thanks.