getcwd()
This function will let you know where you are in the file system. It returns to you the file path of where the script thinks it is. This is what you change with chdir().
echo getcwd(); // /home/admin/public_html chdir( 'test' ); echo getcwd(); // /home/admin/public_html/test
See the manual entry for getcwd()
