PHP Class Ftp

Uso: $ftp = new Ftp('servidorFtp','usuario','password'); Subir archivo: $ok = $ftp->upload('carpetaDestino','archivoOrigen','archivoDestino'); Descargar archivo: $ok = $ftp->downLoad('archivoDelServidor','archivoLocal'); Cerrar sesion: $ftp->close(); Obtener eventuales errores: $array = $ftp->getErrores();
Author: Sergio Pérez ([email protected])
Afficher le fichier Open project: dg/ftp-php Class Usage Examples

Méthodes publiques

Méthode Description
__call ( $name, $args ) : mixed Magic method (do not call directly).
__construct ( $url = NULL, $passiveMode = TRUE )
_errorHandler ( $code, $message ) Internal error handler. Do not call directly.
deleteRecursive ( $path ) : void Recursive deletes path.
fileExists ( $file ) : boolean Checks if file or directory exists.
isDir ( $dir ) : boolean Checks if directory exists.
mkDirRecursive ( $dir ) : void Recursive creates directories.
reconnect ( ) : void Reconnects to FTP server.

Method Details

__call() public méthode

Magic method (do not call directly).
public __call ( $name, $args ) : mixed
Résultat mixed

__construct() public méthode

public __construct ( $url = NULL, $passiveMode = TRUE )

_errorHandler() public méthode

Internal error handler. Do not call directly.
public _errorHandler ( $code, $message )

deleteRecursive() public méthode

Recursive deletes path.
public deleteRecursive ( $path ) : void
Résultat void

fileExists() public méthode

Checks if file or directory exists.
public fileExists ( $file ) : boolean
Résultat boolean

isDir() public méthode

Checks if directory exists.
public isDir ( $dir ) : boolean
Résultat boolean

mkDirRecursive() public méthode

Recursive creates directories.
public mkDirRecursive ( $dir ) : void
Résultat void

reconnect() public méthode

Reconnects to FTP server.
public reconnect ( ) : void
Résultat void