references:joomla.framework:client:jftp-readread
This method reads a file from the FTP server’s contents into the specified buffer. This method returns true if successful, false otherwise. Syntaxboolean read ( $remote, &$buffer )
ExamplesExample 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/ |


