Download???????????? TFTPHandler
????? ? ??????? ???????? ???????????? ??? ???????? ?? ????? ??? ?????? TFTPHandler, ???? ?????????? ?????? ??? Ascoos OS ??? ?????????? ????????? FTP ??? SFTP.
? TFTPHandler ??????? ??????????? ??? ?????????? ?????????, ??????????? ?? ???????, ????????/??????????? ???????, ????????? CSRF, ??? ?????????? ?? WebFTPClient.
??????
?? ???????????? ???? ????????????? ??? ?? ??????????????? ??? ???????? ??? TFTPHandler ?? ?????????? ???????, ????:
- ?????????? ??? ?????????? ????????? FTP/SFTP.
- ?????????? ??? ??????? ????????? ???????.
- ?????????? ????????? ??? ???????????.
- ????????? ?????????????? ??? ????? cache.
????
?? ???????????? ????? ?????????? ?? ???? ?? namespace ASCOOS\OS\Kernel\Net\TFTPHandler ??? ???????? ?? ??? ????????????? ??? Ascoos OS:
- ???? ?????????? ????? ??? ???????? PHP ??????, ?? ????? ??? ??????????????? ?? ?????? ??? ??????????? (?.?., connect.php).
- ? ?????????? ??? ?????? TFTPHandler ????????? ??? /docs/kernel/net/TFTPHandler/README-GR.md.
????????? ????????????
| ?????? ????????????? | ??????? | ????????? |
|----------------------|---------|-----------|
| asyncDownloadFile.php | asyncDownloadFile | ??????????? ??? ????????? ???? ??????? ??? ??? ????????????? ??????????. |
| asyncUploadFile.php | asyncUploadFile | ??????????? ??? ????????? ??????????? ??????? ???? ????????????? ??????????. |
| authenticateWithKey.php | authenticateWithKey | ??????????? ??? ??????????? ?? ???????/???????? ?????? ??? SFTP. |
| bulkDownloadFiles.php | bulkDownloadFiles | ??????????? ?? ?????? ???? ??????? ??? ??? ????????????? ??????????. |
| bulkUploadFiles.php | bulkUploadFiles | ??????????? ?? ?????? ??????????? ??????? ???? ????????????? ??????????. |
| cacheFileList.php | cacheFileList | ??????????? ??? ?????????? ?????? ????????? ?? cache. |
| changeDirectory.php | changeDirectory | ??????????? ??? ?????? ??? ????????? ????????? ???? ????????????? ??????????. |
| compressFile.php | compressFile | ??????????? ?? ???????? ??????? ???? ?? ????????. |
| connect.php | connect | ??????????? ?? ?????????? ???????? FTP ? SFTP. |
| createDirectory.php | createDirectory | ??????????? ?? ?????????? ????????? ???? ????????????? ??????????. |
| decompressFile.php | decompressFile | ??????????? ??? ??????????? ??????? ???? ?? ????????. |
| deleteDirectory.php | deleteDirectory | ??????????? ?? ???????? ????????? ???? ????????????? ??????????. |
| deleteFile.php | deleteFile | ??????????? ?? ???????? ??????? ???? ????????????? ??????????. |
| disconnect.php | disconnect | ??????????? ??? ?????????? ??? ??? ??????????. |
| downloadFile.php | downloadFile | ??????????? ?? ???? ??????? ??? ??? ????????????? ??????????. |
| enablePassiveMode.php | enablePassiveMode | ??????????? ??? ???????????? ? ?????????????? passive mode ??? FTP. |
| generateCsrfToken.php | generateCsrfToken | ??????????? ?? ?????????? CSRF token ??? ???????? web ?????????. |
| getFilePermissions.php | getFilePermissions | ??????????? ??? ???????? ??????????? ??????? ? ?????????. |
| getCurrentDirectory.php | getCurrentDirectory | ??????????? ??? ???????? ??? ????????? ?????????. |
| getTransferStats.php | getTransferStats | ??????????? ??? ???????? ??????????? ????????? ???????. |
| listDirectory.php | listDirectory | ??????????? ?? ????? ???????????? ?????????????? ?????????. |
| logActivity.php | logActivity | ??????????? ??? ????????? ?????????????? FTP/SFTP. |
| login.php | login | ??????????? ?? ??????? ???? ?????????? ?? ????? ?????? ??? ??????. |
| monitorTransferProgress.php | monitorTransferProgress | ??????????? ??? ????????????? ??????? ????????? ???????. |
| reconnect.php | reconnect | ??????????? ??? ???????????? ???? ??????????. |
| restoreFileListFromCache.php | restoreFileListFromCache | ??????????? ??? ????????? ?????? ????????? ??? cache. |
| restoreSession.php | restoreSession | ??????????? ??? ????????? ????????? ??? web ?????????. |
| saveSession.php | saveSession | ??????????? ??? ?????????? ????????? ??? web ?????????. |
| setFilePermissions.php | setFilePermissions | ??????????? ??? ?????? ??????????? ??? ?????? ? ????????. |
| uploadFile.php | uploadFile | ??????????? ?? ??????????? ??????? ???? ????????????? ??????????. |
| validateCsrfToken.php | validateCsrfToken | ??????????? ??? ????????? CSRF token ??? ???????? web ?????????. |
??????????
-
??????????? ??? ?? Ascoos OS ????? ????????????? (????? ?? ????? ??????????). ??? ?????????????? ??? ?????? ?????????
ASCOOS Web Extended Studio (AWES) 26, ???? ??? ?????????? ?? ????????????? ?? `Ascoos OS` ????? ????? ?????????? ?? ?????????????.
-
??????????? ??? ?????? ????????????? ??? `/examples/kernel/net/TFTPHandler/`.
-
????????? ?? PHP ?????? (?.?., `https://localhost/aos/examples/kernel/net/TFTPHandler/connect.php`) ??? ?? ????? ?? ??????????.
?????????? ??????
use ASCOOS\OS\Kernel\Net\TFTPHandler;
$ftpHandler = new TFTPHandler([
'ftp' => [
'protocol' => 'sftp',
'host' => 'example.com',
'port' => 22,
'username' => 'user',
'password' => 'pass'
],
'logs' => ['useLogger' => true, 'dir' => $AOS_LOGS_PATH],
'cache' => ['cacheType' => 'file', 'cachePath' => $AOS_CACHE_PATH]
]);
if ($ftpHandler->connect('example.com', 22, 'user', 'pass', false)) {
echo "??????? ????????\n";
}
$ftpHandler->Free($ftpHandler);
?????
??????????
?????? ?? ?????????? ??????????? ????????????; ????? fork ?? ??????????, ???????????? ??? ??? ?????? ????????????? ??? ????????? pull request. ????? ?? CONTRIBUTING.md ??? ???????.
????? ??????
?? ???????????? ???? ?????????? ???? Ascoos General License (AGL). ????? ?? LICENSE.
|