NYCPHP Meetup

NYPHP.org

[nycphp-talk] relative paths in Windope

David Krings ramons at gmx.net
Sun Sep 24 19:17:43 EDT 2006


At 05:27 PM 9/24/2006, you wrote:
>Is http://us3.php.net/getcwd what you're looking for?
>
>mkdir (getcwd () . "\\directoryname");
>
>DiRN

That would work as well. What I did is use this
dirname($_SERVER['SCRIPT_FILENAME'])
in the start file and assigned the output to a session variable. It 
basically gives me the "root" of my entire folder set. This way I can 
always extend the path if needed. Using getcwd will work fine when I deal 
only with things that are in my current directory. In the described case, 
that is so, but I know for sure that I will need the path to point to some 
place that is down a different tree from the root.

Thanks for the tip.


David K. 




More information about the talk mailing list