Re: Determine path with php
The easiest way to find things like this when you are stuck is just to use the phpinfo() command eg
PHP Code:
<?php phpinfo(); ?>
It will bring up a massive page of info about PHP and the server, and if you scroll down to the bottom block, gives all the server variables that can be used and the info in each one. You can then find the one that gives you the info you need and use it in your code.
It's fantastic for working on a new server that you haven't used before, and is incredibly helpfull.
|