Search w3schools.com:

SHARE THIS PAGE

PHP ftp_site() Function


PHP FTP Reference Complete PHP FTP Reference

Definition and Usage

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

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

This function returns TRUE on success and FALSE and a warning on failure.

Syntax

ftp_site(ftp_connection,command)

Parameter Description
ftp_connection Required. Specifies the FTP connection to use
command Required. Specifies the SITE command to send to the FTP server


Tips and Notes

Tip: To see what commands are available, send the REMOTEHELP command using 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);
?>


PHP FTP Reference Complete PHP FTP Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]