The ftp_pwd() function returns the current directory name.
string ftp_pwd ( resource $ftp_stream )
Returns the current directory name or FALSE on error.