- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
ftp_pwd() function in PHP
The ftp_pwd() function returns the present working directory i.e. the current directory.
Syntax
ftw_pwd(con)
Parameters
con − The FTP connection
Return
The ftp_pwd() function returns TRUE on success or FALSE on failure.
Example
The following is an example −
<?php $ftp_server = "192.168.0.4"; $ftp_user = "tim"; $ftp_pass = "wthbn#@121"; $con = ftp_connect($ftp_server) or die("Could not connect to $ftp_server"); $login = ftp_login($con, $ftp_user, $ftp_pass); // change the current directory ftp_chdir($con, "demo"); // now the current directory is updated to demo echo ftp_pwd($con); // close ftp_close($con); ?>
Advertisements