Bindings to the » libssh2 library which provide access to resources (shell, remote exec, tunneling, file transfer) on a remote machine using a secure cryptographic transport.
Windows binaries may be found at » http://snaps.php.net/. To install, download php_ssh2.dll to the folder specified by your php.ini file's extension_dir directive. Enable it by adding extension=php_ssh2.dll to your php.ini and restarting your web server.
extension_dir=c:/php5/exts/ extension=php_ssh2.dll
Linux, BSD, and other *nix variants can be compiled using the following steps:
Note: Development Versions There are currently no stable versions of PECL/ssh2, to force installation of the beta version of PECL/ssh2 execute: pear install ssh2-beta
Rather than using pear install ssh2 to automatically download and install PECL/ssh2, you may download the tarball from » PECL. From the root of the unpacked tarball, run: phpize && ./configure --with-ssh2 && make to generate ssh2.so. Once built, continue the installation from step 4 above.
安装此 PECL 扩展库的信息可在手册中标题为 PECL 扩展库安装的一章中找到。 更多信息如新版本,下载,源文件,维护者信息以及更新日志等可以在这里找到: » http://pecl.php.net/package/ssh2.
Note: You will need version 0.4 or greater of the libssh2 library (possibly higher, see release notes).
以下常量由本扩展模块定义,因此只有在本扩展模块被编译到 PHP 中,或者在运行时被动态加载后才有效。