Support Joomla!

references:joomla.framework:client:jftp-read

Table of Contents

read

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

This method reads a file from the FTP server’s contents into the specified buffer. This method returns true if successful, false otherwise.

Syntax

boolean read ( $remote, &$buffer )

$remote string is a string containing the path to remote file to read on the FTP server.
$buffer string is a buffer variable to read the contents of the file into.

Examples

Example

jimport( 'joomla.connector.ftp' );

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

$buffer = '';
$ftp->read( 'test/robots.txt', $buffer );
echo $buffer;

might produce:

Results

User-agent: * 
Disallow: /administrator/
Disallow: /cache/
Disallow: /components/
Disallow: /editor/
Disallow: /help/
Disallow: /images/
Disallow: /includes/
Disallow: /language/
Disallow: /mambots/
Disallow: /media/
Disallow: /modules/
Disallow: /templates/
Disallow: /installation/
 
references/joomla.framework/client/jftp-read.txt (488 views) · Last modified: 2007/08/15 15:13