Ftp
in package
FTP class
Tags
Table of Contents
Properties
- $address : string|null
- FTP address
- $connection : mixed
- FTP resource
- $connectionString : string|null
- FTP connection string
- $password : string|null
- FTP password
- $username : string|null
- FTP username
Methods
- __construct() : mixed
- Constructor
- chdir() : Ftp
- Change directories
- chmod() : Ftp
- Change permissions
- delete() : Ftp
- Delete file
- dirExists() : bool
- Check if directory exists
- disconnect() : void
- Close the FTP connection.
- fileExists() : bool
- Check if file exists
- get() : Ftp
- Get file
- getConnection() : mixed
- Get the connection resource
- getConnectionString() : string
- Get the connection string
- isConnected() : bool
- Determine whether or not connected
- mkdir() : Ftp
- Make directory
- mkdirs() : Ftp
- Make nested sub-directories
- pasv() : Ftp
- Switch the passive mode
- put() : Ftp
- Put file
- pwd() : string
- Return current working directory
- rename() : Ftp
- Rename file
- rmdir() : Ftp
- Remove directory
Properties
$address
FTP address
protected
string|null
$address
= null
$connection
FTP resource
protected
mixed
$connection
= null
$connectionString
FTP connection string
protected
string|null
$connectionString
= null
$password
FTP password
protected
string|null
$password
= null
$username
FTP username
protected
string|null
$username
= null
Methods
__construct()
Constructor
public
__construct(string $address, string $user, string $pass[, bool $ssl = false ]) : mixed
Instantiate the FTP object
Parameters
- $address : string
- $user : string
- $pass : string
- $ssl : bool = false
Tags
chdir()
Change directories
public
chdir(string $dir) : Ftp
Parameters
- $dir : string
Tags
Return values
Ftpchmod()
Change permissions
public
chmod(string $file, string $mode) : Ftp
Parameters
- $file : string
- $mode : string
Tags
Return values
Ftpdelete()
Delete file
public
delete(string $file) : Ftp
Parameters
- $file : string
Tags
Return values
FtpdirExists()
Check if directory exists
public
dirExists(string $dir) : bool
Parameters
- $dir : string
Return values
booldisconnect()
Close the FTP connection.
public
disconnect() : void
fileExists()
Check if file exists
public
fileExists(string $file) : bool
Parameters
- $file : string
Return values
boolget()
Get file
public
get(string $local, string $remote[, int $mode = FTP_BINARY ]) : Ftp
Parameters
- $local : string
- $remote : string
- $mode : int = FTP_BINARY
Tags
Return values
FtpgetConnection()
Get the connection resource
public
getConnection() : mixed
getConnectionString()
Get the connection string
public
getConnectionString() : string
Return values
stringisConnected()
Determine whether or not connected
public
isConnected() : bool
Return values
boolmkdir()
Make directory
public
mkdir(string $dir) : Ftp
Parameters
- $dir : string
Tags
Return values
Ftpmkdirs()
Make nested sub-directories
public
mkdirs(string $dirs) : Ftp
Parameters
- $dirs : string
Tags
Return values
Ftppasv()
Switch the passive mode
public
pasv([bool $flag = true ]) : Ftp
Parameters
- $flag : bool = true
Return values
Ftpput()
Put file
public
put(string $remote, string $local[, int $mode = FTP_BINARY ]) : Ftp
Parameters
- $remote : string
- $local : string
- $mode : int = FTP_BINARY
Tags
Return values
Ftppwd()
Return current working directory
public
pwd() : string
Return values
stringrename()
Rename file
public
rename(string $old, string $new) : Ftp
Parameters
- $old : string
- $new : string
Tags
Return values
Ftprmdir()
Remove directory
public
rmdir(string $dir) : Ftp
Parameters
- $dir : string