Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
10-12-2012, 04:02 PM #1
- Join Date
- May 2012
- Thanked 1 Time in 1 Post
best way to get installed directory
I'm trying to build a project that I plan on making installable in the future, what i'm trying to do is find a way to get the directory that the app is installed in, I have a config page created and would like to set a variable in there that would store the apps root directory.
So lets say for example I want to include an image instead of writing the full value manually I want to be able to put $variable/images/image.png or something similar.
Thanks in advance
10-12-2012, 05:37 PM #2
PHP has a host of native directory functions for that. They are used by installable CMS' such as Wordpress...getcwd() will get the current directory of the script.
Check out http://php.net/manual/en/ref.dir.php for more directory functions