PHP ftp_chmod() Function4 Sept 2024 | 2 min read The ftp_chmod() function is used to set permissions on a specified remote file via FTP. This function was introduced in PHP 5. Syntax:
ReturnsThis method returns the new file permissions on success or FALSE on error. Example 1ExplanationIn the above program, we change the permission of file by using chmod() function and 644 means that files are readable and writeable by the owner of the file and readable by users in the group owner of that file and readable by everyone else. Example 2ExplanationIn the above example, file permission change to 644 to 755.755, it means full permissions for the owner and read and execute permission for others. Next TopicPHP FTP |
PHP Function The function returns when the specified file was last modified. This function was introduced in PHP 4. Syntax: int ftp_mdtm ( resource $ftp_stream , string $remote_file ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory remote_file The file from which to extract the last modification time. compulsory Returns This function returns...
1 min read
PHP Function The function is used to change the current directory to the parent directory. This function was introduced in PHP 4. Syntax: bool ftp_cdup ( resource $ftp_stream ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory Returns The ftp_cdup( ) function returns TRUE on success or FALSE on failure. Example...
1 min read
PHP ftp_delete( ) Function The function is used to delete a file on the FTP server.This function was introduced in PHP 4. Syntax: bool ftp_delete ( resource $ftp_stream , string $path ); Parameter Description Is compulsory ftp_connection The link identifier of the FTP connection. compulsory file_name The file to delete. compulsory Returns The ftp_delete( ) function returns true on...
1 min read
PHP Function The function returns a list of file in the given directory. This function was introduced in PHP 7.2.0. Syntax: array ftp_mlsd ( resource $ftp_stream , string $directory ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory directory The directory to be listed. compulsory Return value: The function returns an array...
1 min read
PHP Function The function is used to change the current directory to a specified directory on an FTP server. This function was introduced in PHP 4. Syntax: bool ftp_chdir ( resource $ftp_stream , string $directory ); Parameter Description Is compulsory ftp_connection/stream The link identifier of the FTP connection. compulsory directory The target directory. compulsory Returns This method returns...
1 min read
PHP ftp_fput( ) Function The function is used to uploads from an open file to the FTP server. This function was introduced in PHP 4. Syntax: bool ftp_fput ( resource $ftp_stream , string $remote_file , resource $handle [, int $mode = FTP_IMAGE [, int $startpos = 0 ]]...
1 min read
PHP ftp_get( ) Function The function is used to download a file from the FTP server. The function retrieves a remote file from the FTP server, and saves it into a local file. This function was introduced in PHP 4. Syntax: bool ftp_get ( resource $ftp_stream ,...
2 min read
PHP Function The function is used to closes an FTP connection or given link. This function introduced in PHP 4.2.0 Syntax: bool ftp_close ( resource $ftp_stream ); Parameter Description Is compulsory ftp_connection/ftp_stream The link identifier of the FTP connection. compulsory Returns The ftp_close( ) function returns TRUE on success or FALSE on failure. Important note: After...
1 min read
PHP function The function continues to receive/send a file to the FTP server.This function sends/retrieves the file asynchronously. This function was introduced in PHP 4.3.0. Syntax: int ftp_nb_continue ( resource $ftp_stream ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory Returns The function returns FTP_FAILED or FTP_FINISHED or FTP_MOREDATA. FTP_FAILED...
1 min read
PHP Function The function is used to creates a directory on the FTP server. This function was introduced in PHP 4. Syntax: string ftp_mkdir ( resource $ftp_stream , string $directory ); Parameter Description Is compulsory ftp_stream The link identifier of the FTP connection. compulsory directory The name of the directory that will be created. compulsory Returns The ...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India