Свойство | Тип | Описание | |
---|---|---|---|
$debug | boolean | Specifies whether to display error messages. | |
$hostname | string | FTP Server hostname | |
$passive | boolean | Passive mode flag | |
$password | string | FTP Password | |
$port | integer | FTP Server port | |
$username | string | FTP Username |
Свойство | Тип | Описание | |
---|---|---|---|
$conn_id | resource | Connection ID |
Метод | Описание | |
---|---|---|
__construct ( array $config = [] ) : void | Constructor | |
changedir ( string $path, boolean $suppress_debug = FALSE ) : boolean | Change directory | |
chmod ( string $path, integer $perm ) : boolean | Set file permissions | |
close ( ) : boolean | Close the connection | |
connect ( array $config = [] ) : boolean | FTP Connect | |
delete_dir ( string $filepath ) : boolean | Delete a folder and recursively delete everything (including sub-folders) contained within it. | |
delete_file ( string $filepath ) : boolean | Rename (or move) a file | |
download ( string $rempath, string $locpath, string $mode = 'auto' ) : boolean | Download a file from a remote server to the local server | |
initialize ( array $config = [] ) : void | Initialize preferences | |
list_files ( string $path = '.' ) : array | FTP List files in the specified directory | |
mirror ( string $locpath, string $rempath ) : boolean | Read a directory and recreate it remotely | |
mkdir ( string $path, integer $permissions = NULL ) : boolean | Create a directory | |
move ( string $old_file, string $new_file ) : boolean | Move a file | |
rename ( string $old_file, string $new_file, boolean $move = FALSE ) : boolean | Rename (or move) a file | |
upload ( string $locpath, string $rempath, string $mode = 'auto', integer $permissions = NULL ) : boolean | Upload a file to the server |
Метод | Описание | |
---|---|---|
_error ( string $line ) : void | Display error message | |
_getext ( string $filename ) : string | Extract the file extension | |
_is_conn ( ) : boolean | Validates the connection ID | |
_login ( ) : boolean | FTP Login | |
_settype ( string $ext ) : string | Set the upload type |
public __construct ( array $config = [] ) : void | ||
$config | array | |
Результат | void |
public delete_dir ( string $filepath ) : boolean | ||
$filepath | string | |
Результат | boolean |
public delete_file ( string $filepath ) : boolean | ||
$filepath | string | |
Результат | boolean |
public initialize ( array $config = [] ) : void | ||
$config | array | |
Результат | void |
public list_files ( string $path = '.' ) : array | ||
$path | string | |
Результат | array |
public bool $debug | ||
Результат | boolean |