Ec (2); ByVikramVaswaniMelonfireNovember07, 2000 logged on to the FTP server. PHP provides some functions that can obtain information about systems, files, and directories. FTP_pwd () If you want to know your current directory, you need to use this function. ------------- Script ec (2); script
By Vikram Vaswani
Melonfire
November 07,200 0
After logging on to the FTP server, PHP provides some functions that can obtain information about the system, files, and directories.
FTP_pwd ()
If you want to know your current directory, you need to use this function.
--------------------------------------------------------------------------------
// Get current location
$ Here = FTP_pwd ($ conn );
?>
--------------------------------------------------------------------------------
In case you need to know what system the server is running?
FTP_systype () is provided to you in this regard.
--------------------------------------------------------------------------------
// Get system type
$ Server_ OS = ftp_cmdype ($ conn );
?>
--------------------------------------------------------------------------------
Regarding the PASV switch, PHP also provides a function that enables or disables PASV (1 indicates on)
--------------------------------------------------------------------------------
// Turn PASV on
FTP_pasv ($ conn, 1 );
?>
--------------------------------------------------------------------------------
Now, you know where you are and who you are with. Now we are going to browse through the directory-The FTP_chdir () function is used to implement this function, it accepts a directory name as a parameter.
--------------------------------------------------------------------------------
// Change directory to "public_html"
FTP_chdir ($ conn, "public_html ");
?>
--------------------------------------------------------------------------------
If you want to return to the directory (parent directory) where you are located ),