在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):harishanchu/Laravel-FTP开源软件地址(OpenSource Url):https://github.com/harishanchu/Laravel-FTP开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Laravel-FTPA simple Laravel 5/6/7 ftp service provider. v1.0.0For Laravel 4.x, checkInstallationAdd the package to your
Add the service provider in
ConfigurationRun You can add dynamic FTP connections with following syntax Config::set('ftp.connections.key', array(
'host' => '',
'username' => '',
'password' => '',
'passive' => false,
'secure' => false,
)); Accessing connectionsYou can access default FTP connection via the FTP::connection()->getDirListing(...); When using multiple connections you can access each specific ftp connection by passing connection name: FTP::connection('foo')->getDirListing(...); Sometimes you may need to reconnect to a given ftp: FTP::reconnect('foo'); If you need to disconnect from a given ftp use the disconnect method: FTP::disconnect('foo'); Basic usage examples// With custom connection
$listing = FTP::connection('my-ftp-connection')->getDirListing();
// with default connection
$listing = FTP::connection()->getDirListing();
$status = FTP::connection()->makeDir('directory-name'); Supported methodsgetDirListing($directory, $parameters ) Returns a list of files in the given directory
getDirListingDetailed($directory) Returns a list of files in the given directory as an associative array with the following keys: rights, number, user, group, size, month, day and time
makeDir($directory) Creates the specified directory on the FTP server.
changeDir($directory) Changes the current directory on a FTP server.
uploadFile($fileFrom, $fileTo, $mode) Uploads a local file to the FTP server.
downloadFile($fileFrom, $fileTo, $mode) Downloads a file from the FTP server
readFile($fileFrom) Same as the
moveUp() Changes to the parent directory. permission($mode, $filename) Set permissions on a file.
delete($path) Deletes the file specified by path from the FTP server.
currentDir() Returns the current directory name rename($oldName, $newName) Renames a file or a directory on the FTP server.
removeDir($directory, $recursive) Removes a directory
truncateDir($directory) Truncates a directory
size($remoteFile) Returns the size of the given file in bytes.
time($remoteFile) Returns the last modified time of the given file
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论