WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

PHP ftp_site () function


Definition and usage

The ftp_site () function sends a SITE command to the FTP server.

The SITE command is not standardized and varies from server to server. The SITE command is useful for things like file permissions or group relationships.

If successful, the function returns TRUE. If it fails, FALSE and a warning are returned.

Syntax

ftp_site (ftp_connection, command)

parameters description
ftp_connection Required. Specifies the FTP connection to use.
command Required. Specifies the SITE command to be sent to the FTP server.


Tips and comments

Tip: To see which commands are available, send the REMOTEHELP command via the ftp_raw () function.


Example

<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");

ftp_site($conn,"CHMOD 0600 sitetest.txt");

ftp_close($conn);
?>