Current Location: Home> Function Categories> ftp_site

ftp_site

Send a SITE command to the server.
Name:ftp_site
Category:Uncategorized
Programming Language:php
One-line Description:Send a SITE command to the server.

Definition and usage

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

The SITE command is not standardized. Different servers are different. The SITE command is useful for handling file permissions or group relationships.

实例

<?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);
?>

grammar

 ftp_site ( ftp_connection , command )
parameter describe
ftp_connection Required. Specifies the FTP connection to be used (the identifier of the FTP connection).
Command Required. Specifies the SITE command sent to FTP.

illustrate

The ftp_site() function sends the command specified by the parameter command to the FTP server.

Return true if successful, and false if failed.

Similar Functions
Popular Articles