Is there a way to get the FTP root directory dynamically lik



Ok, I have something setup and working, but – this is the problem, how can you get the ftp root directory automatically

Lets say Doc_Root returns:

When you login to FTP you are here:

but the FTP_ROOT is

Is there a way to grab that automatically?


If I understand you correctly, you are looking to see if there is a super global (Like Document_Root)) to identify the FTP_ROOT.

I would have to say the answer to your question is NO. This is not a predifined variable in PHP. However, if it can be extracted from the shell, you could consider using SHELL_EXEC()