更多>
最新下载
24小时阅读排行榜
- 1 win11安装程序无法创建新的系统分区怎么办_win11系统分区创建失败的解决方案
- 2 Linux命令行中ps命令的使用方法
- 3 Python pandas 性能优化技巧
- 4 Linux tc命令流量控制使用方法
- 5 win11怎么更改用户文件夹名称 win11修改C盘用户文件夹名称教程
- 6 床垫上的尿渍怎么去除?
- 7 win10无法访问您所在的单位网络_无法访问单位网络的权限解决方法
- 8 win10提示“RPC服务器不可用”_RPC服务远程过程调用失败错误修复
- 9 JAX自定义Module梯度计算指南:理解与实践PyTree机制
- 10 win11麦克风没声音或无法使用的解决办法_Win11麦克风无响应问题修复指南
- 11 html超链接字体颜色修改需要什么代码
- 12 win10网络重置后无法上网_执行网络重置后断网问题修复
- 13 win10更新后没有声音怎么办_Win10更新后声卡驱动问题修复
- 14 python安装cv2模块的方法
- 15 python如何改变工作目录_python os模块更改当前工作目录方法
更多>
最新教程
-
- Node.js 教程
- 2866 2025-08-28
-
- CSS3 教程
- 311331 2025-08-27
-
- Rust 教程
- 3522 2025-08-27
-
- Vue 教程
- 4255 2025-08-22
-
- PostgreSQL 教程
- 4420 2025-08-21
-
- Git 教程
- 3350 2025-08-21
下载首页 / 类库下载 / 其它类库
今天给大家带来在多台远程机器上并行运行的命令行的PHP库,我们下面来看一段代码。
<?php namespace League\Shunt; use League\Shunt\Contracts\SCPInterface; use League\Shunt\Contracts\SessionInterface; use League\Shunt\BaseObject; use Symfony\Component\Console\Output\OutputInterface; use RuntimeException; class SCP extends BaseObject implements SCPInterface { protected $session; public function __construct(SessionInterface $session, OutputInterface $output) { // Set the base object properties parent::__construct($session, $output); if ( ! $session->valid()) throw new RuntimeException('SSH connection failed.'); $this->session = $session; } public function put($localFile = '', $remoteFile = '') { return $this->doRun(__METHOD__, func_get_args(), ssh2_scp_send($this->session->getConnection(), $localFile, $remoteFile)); } public function get($remoteFile = '', $localFile = '') { return $this->doRun(__METHOD__, func_get_args(), ssh2_scp_recv($this->session->getConnection(), $remoteFile, $localFile)); } }


本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:admin@php.cn