Workerman? PHP? ???? ??? ??? ??? ??? ?? ??????, TCP/UDP ?????? ? ?? ??? ?? ??? ? ????. ?? Workerman? ??? ?? ??, ??? ?? ?? ?????? ??? ? ?? ?? ?? ?? ??? ?????. ? ???? Workerman?? ?? ?? ??? ???? ??? ???? ???? ?? ??? ?????.
1. ?? ??? ?? ??
?? ??? ??? ???? ??? ?????? ??? ??? ??, ??? ??? ???? ?????. Workerman??? Workerman/file-transfer ????? ???? ?? ??? ??? ??? ? ????. ???? ??? ??? ????.
- ?????? ??? zip ??? ????? ??? ????.
$ftp = new Ftp($server_ip, $server_port); $ftp->connect(); $response = $ftp->send($zip_file_path);
??? FTP ?? ??? ?????? ???? zip ??? ??? ??? ? ?????.
- ??? ?? ??? ???? ??? ??.
public static function handle($connection, $data) { $zip_file = 'upload_file.zip'; file_put_contents($zip_file, $data); $zip = new ZipArchive(); if ($zip->open($zip_file) === TRUE) { $zip->extractTo('./unzip_file/'); $zip->close(); unlink($zip_file); } else { $connection->send("unzip failed"); } }
??? ???/?? ?? ?? ??? ?? ???????? ?? ???? ???? ?? zip ??? ?????. ?? ?? ZipArchive ?????? ???? ??? ??? ?? ??? ?? ??? ??? ????? ?????. ?? ??? ???? ?? ??? ?????? ?????.
2. ?? ???? ?? ??
?? ???? ??? ?????? ??? ??? ????, ???? ??? ?? ???? ?? ??? ???? ?????. Workerman??? PHP? fopen() ??? ???? ?? ?? ??? ??? ?? ??? ??, ???? ??? ?? ???? ?? ??? ? ? ????. ???? ????? ??? ????.
- ?????? ??? ?? ???? ??? ?????.
$client->send(json_encode([ 'type' => 'download', 'filename' => $filename, ]));
?????? ????? ?? ??? ??? ???? ??? ????.
- ??? ?????? ??? ???? ???? ???? ?? ???? ????.
public static function handle($connection, $data) { $data = json_decode($data, true); $filename = $data['filename']; if (!file_exists($filename)) { $connection->send(json_encode(['code' => -1, 'msg' => 'file not exist'])); return; } $fp = fopen($filename, 'rb'); $total = filesize($filename); $connection->send(json_encode(['code' => 0, 'msg' => 'filesize', 'data' => ['size' => $total]])); while (!feof($fp)) { $connection->send(fread($fp, 8192), true); } fclose($fp); }
?????? ??? ?? ? ??? ?? ??? ????? ?????. ??? ???? ??? ?? ???? ?????? ?????. ??? ???? fopen() ??? ???? ?? ??? ?? ??? ?? ??? ?????. ?? ?? ?? ?? ?? ??? ?????? ????. ? ?, ?? ??? while ??? ?? ?????? ?? ? ?????.
- ?????? ????? ?? ???? ?? ?? ??? ?????.
public function download($client, $response) { $this->downloadSize = 0; $this->downloadTotal = $response['data']['size']; $data = json_encode(['type' => 'download_continue']); while ($this->downloadSize < $this->downloadTotal) { $client->send($data); } fclose($fp); }
?????? ????? ?? ?? ??? ?? ? ??? ???? ??? ?? ?? ???? ?? ?? ??? ?????.
?????, Workerman/file-transfer ????? PHP? fopen() ??? ???? Workerman?? ?? ???, ???? ??? ?? ??? ? ????. ??? ??? ???? ?? ??? ??? ????? ?? ??? ??? ????? ?? ?? ?? ??? ???? ??? ?? ?????.
? ??? Workerman ??? ?? ?? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

?? ???? WeChat? '?? ?? ???' '??'? ??? ??? ???? ????. ??? ?? ???? ?? ?? ???? ???? ?? ????. ???? ???? ??? ????? ???? ? ?????. ??? ??? ?????. ?? WeChat ?? ?? ???? ??? ???? ?? ?? ?????! WeChat ?? ?? ??? ?? ?? 1. ??? ?? ??: WeChat ?? ?? ???? ???? ???? WeChat ????? ??, ??, ???, ??? ? ??? ??? ?? ??? ? ????. ???? ????? ???? ?? ??? ????? ?? ??? ???? ?? ??? ?????. ? ??? ???? ???, ??, ?? ? ?? ????? ?? ??????.

Huawei ????? ?? WeChat ???? ???? ??? ?????? ?? ???? ???? WeChat? ???? ?? ??? ???? ?? ?????? ?? ? ??? ?????. ??? ?? ???? ??? ????? ??? ?? WeChat ??? ????? ??? ??? ? ????. Huawei ??? ???? ?? ?? WeChat ???? ???? ?? ??? ????. ? ????? Huawei ????? ?? WeChat ???? ???? ??? ?????. ??, ??? ???? ?? ???? EMUI ???? ?? ?????? ???? ?? ??? ??? ?????. ? ?? ?? ??? ?? ???? ???

????? ?? PHP? ??? ????? ??? ????? ??? ? ?? ??? ? ?? ?????. ?? ???? ??? ???? ?? ????? ???? ????? ?????. ? ????? PHP ????? ??? ???? ???? ??? ???? ??? ???? ???? ?? ??? ?????. ???? ??? ??? ?? ???? ??? ?????. ??? ? ??? ? ?? ??? 1?? ? ?? ???? ???? ? ??? ?? ?? ? ??? ?? ????. ???? ?? ? ?? ??

WeChat ?? ?? ???(?)?? ?? ?? ?? ?? ??? ??? ??? WeChat? ???? ?? ??????? ??? ?? ??? ?? ??? ?? ? ??? ?????. WeChat? ???? ??? ??? ?? ???? ??? ? ??? ?? ?? ???? ??? ??? ??? ?????. ??? ?? ???? ?? WeChat ?? ?? ??? ? ??? ??? ??? ? ??? ??????. ? ??? ???? ??? ??? ????????. ??, WeChat ?? ?? ??? ? ??? ???? ??? ?? ??? ?????,

Swoole? Workerman? ?? ??? PHP ?? ????????. ??? ??, ??? ?? ? ????? ? ??? Swoole? ?? ?? ?? ??? ?? ???? ???? ?? ????? ?????. Workerman? ?? ???? ?? ??? ??? ???? ????? ? ??? ???? API? ?? ???? ? ??? ??? ???? ?????.

PHP ?? ???? ?? ??? ???? ???? ???? ?? ? ?? ??? ?? ? ????? ????. ?? ???? PHP ??? ???? ???? ? ??? ????? ??? ?? ?? ??? ???? ?? ?? ?????. ? ????? PHP ??? ???? ???? ?? ?? ??? ???? ??? ???? ?? ?? ??? ?????. 1. ?? ??? ??? ????? ?? ???? ?? ??? ?????. ??, ??, ??? ? ?? ???? ??? ????, ?? ??? ? ?? ??? ???? ???.

Huawei ????? WeChat ?? ??? ???? ?? ?? ?????? ??? ?? ?? ?? ? ??? ?? ???? ??? ????? WeChat ?? ??? ?? ??? ?? ????. WeChat ?? ??? ???? ???? ??? ????? ?? WeChat ??? ??? ???? ? ???? ?? ? ??? ? ?????. Huawei ????? WeChat ?? ??? ???? ?? ??? ????. ?? ??? ??? ???. 1??: ??? ??? ??? WeChat ??? ?? ??? ????? ??????. ?? Huawei ??? ??? ??? WeChat ?? ?? ???? ???????? ?????.

???? ????? ?? ???? ????? ???? ???? ??? ????? ??? Golang(Go ??)? ?? ? ????? ??? ?? ????. ??? ?? ?????? ???? ??? ???? ?? ?? ?? ???? ???? ??? ?????. ? ????? ?? ??? Golang? ???? ??? ???? ?? ?? ??? ?? Golang? ??? ???? ?????. 1. ?? ???? Golang? ?? Golang? ??? ??? ???? ??? ?? ???? ???? ? ?????.
