\libFtp

Summary

Methods
Properties
Constants
__construct()
close()
makeDirectory()
deleteDirectory()
folderPermission()
uploadFile()
deleteFile()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$conn
$basePath
N/A

Properties

$conn

$conn : integer

hold the FTP connction

Type

integer

$basePath

$basePath : string

holds the path relative to the root of the server

Type

string

Methods

__construct()

__construct(string  $host, string  $user, string  $pass, string  $base) 

open a FTP connection

Parameters

string $host

the server address

string $user

username

string $pass

password

string $base

the public folder usually public_html or httpdocs

close()

close() 

close the connection

makeDirectory()

makeDirectory(string  $dirToCreate) 

create a directory on th remote FTP server

Parameters

string $dirToCreate

name of the directory to create

deleteDirectory()

deleteDirectory(string  $dir) 

delete directory from FTP server

Parameters

string $dir

foldr to delete

folderPermission()

folderPermission(string  $folderChmod, integer  $permission) : string

Set folder permission

Parameters

string $folderChmod

folder name

integer $permission

permission value

Returns

string —

success message

uploadFile()

uploadFile(string  $remoteFile, string  $localFile) : string

upload file to remove FTP server

Parameters

string $remoteFile

path and filename for remote file

string $localFile

local path to file

Returns

string —

message

deleteFile()

deleteFile(string  $file) 

delete remove file

Parameters

string $file

path and filename