...

View Full Version : best way to get installed directory



probi
10-12-2012, 03:02 PM
Hi all,

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

Redcoder
10-12-2012, 04:37 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum