PHP ftp_cdup() Function

The ftp_cdup() function is used to change the current directory to the parent directory. This function was introduced in PHP 4.

Syntax:

ParameterDescriptionIs compulsory
ftp_streamThe link identifier of the FTP connection.compulsory

Returns

The ftp_cdup( ) function returns TRUE on success or FALSE on failure.

Example 1

Explanation

In the above example, by using the ftp_cdup() function we change the current directory to the parent directory.

Example 2

Explanation

In the above example, by using ftp_chdir( ) function we change the directory and after that by using ftp_cdup( ) function we change the directory to the parent.

Example 3

Explanation

In the above example, by using ftp_cdup( ) function we change the directory to parent directory.


Next TopicPHP FTP




Latest Courses