The ftp_site() function sends the SITE command to the FTP server.
SITE commands are not standardized and vary from server to server. The SITE command is useful for working with file permissions or group relationships.
If successful, the function returns TRUE. On failure, returns FALSE and a warning.
ftp_site(ftp_connection,command)
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to use. |
command | Required. Specifies the SITE command sent to the FTP server. |
Tip: To see which commands are available, send the REMOTEHELP command through the ftp_raw() function.
<?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);?>