Support Joomla!

references:joomla.framework:client:jftp-chmod

Table of Contents

chmod

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Client Class JFTP Method chmod Reference chmod() Never Work in Progress

This method changes the mode for a path on the FTP server.

Syntax

boolean chmod ( $path, $mode )

$path string is a string containing the path to change mode on.
$mode string is a string containing the octal value to change mode to.

Examples

Example

jimport( 'joomla.connector.ftp' );

$ftp = new JFTP( array( 'type' => FTP_BINARY ) );
$ftp->connect( '127.0.0.1' );
$ftp->login( 'testuser', 'testpass' );

if ($ftp->chmod( 'john3.mp3', '777' ) ) {
    echo "CHMOD successful!";
} else {
    echo "CHMOD failed!";
}

might produce:

Result

CHMOD successful!
 
references/joomla.framework/client/jftp-chmod.txt (606 views) · Last modified: 2007/08/15 15:13