PHP ftp_chdir() Function

PHP ftp_chdir() Function


Define :

In this tutorial we learned about PHP ftp_chdir() Function.This PHP ftp_chdir() Function is inbuilt function in php.This function is used to changes the current directory to the specified one on the FTP server.

Syntax
ftp_chdir(ftp, directory)
Parameters
ftp Required. Specify the FTP connection to use.
directory Required. Specify the target directory.

Given below example shows the usage of ftp_chdir() function :

 

Output : Successfully connected to www.webdesigninghouse.com! Couldn't connect as user Connection closed successfully!