IT. Expert System.

PHP

Sends a SITE command to the server


ftp_site

(PHP 4, PHP 5)

ftp_siteSends a SITE command to the server

Description

bool ftp_site ( resource $ftp_stream , string $command )

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.

Parameters

ftp_stream

The link identifier of the FTP connection.

command

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.

Examples

Example #1 Sending a SITE command to an ftp server

<?php
// Connect to FTP server
$conn ftp_connect('ftp.example.com');
if (!
$conn) die('Unable to connect to ftp.example.com');

// Login as "user" with password "pass"
if (!ftp_login($conn'user''pass')) die('Error logging into ftp.example.com');

// Issue: "SITE CHMOD 0600 /home/user/privatefile" command to ftp server
if (ftp_site($conn'CHMOD 0600 /home/user/privatefile')) {
   echo 
"Command executed successfully.\n";
} else {
   die(
'Command failed.');
}
?>

See Also

  • ftp_raw() - Sends an arbitrary command to an FTP server



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 12959 / 248373594. Delta: 0.02611 с