-->
--> by Vikram Vaswani
Melonfire
November 07, 2000
Logged on to the FTP server, PHP provides functions that can get information about systems and 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);
?>
--------------------------------------------------------------------------------
What if you need to know what system is running on the server side?
Ftp_systype () provides you with this information.
--------------------------------------------------------------------------------
?
Get system Type
$server _os = Ftp_systype ($conn);
?>
--------------------------------------------------------------------------------
On the passive mode (PASV) switch, PHP also provides such a function, it can turn on or off PASV (1 means open)
--------------------------------------------------------------------------------
?
Now that you know where you are and who is with you, now we're going to go around the table of contents--The Ftp_chdir () function, which takes a directory name as an argument.
--------------------------------------------------------------------------------
?
Change directory to "Public_html"
Ftp_chdir ($conn, "public_html");
?>
--------------------------------------------------------------------------------
If you want to go back to the directory (parent directory) where you just were,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service