Net_FTP::pwd() – returns the directory on the server you are currently in.


require_once 'Net/FTP.php';

mixed Net_FTP::pwd ( )


Returns the directory currently selected on the server.

Return value

mixed - path (absolute) as string on success, otherwise PEAR::Error.


The returned PEAR_Error object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Could not determine the actual path" will be returned if the operation fails.


This function can not be called statically.


Using pwd()


echo $test->pwd();

changes the directory on the server. (Previous) creates a new directory. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.