PHP 4, PHP 5, PHP 7, PHP 8
ftp_site - Sends a SITE command to the server
Code Examples

ftp_site( FTP\Connection$ftp, string$command ): bool

ftp_site sends the given SITE command to the FTP server.

SITE commands are not standardized, and vary from server to server. They are useful for handling such things as file permissions and group membership.



An FTP\Connection instance.


The SITE command. Note that this parameter isn't escaped so there may be some issues with filenames containing spaces and other characters.

Return Values

Returns true on success or false on failure.


Version Description
8.1.0 The ftp parameter expects an FTP\Connection instance now; previously, a resource was expected.

Related Functions

Example of ftp_site

Show all examples for ftp_site

PHP Version: