SFTP from within PHP

前端 未结 5 1407
别那么骄傲
别那么骄傲 2020-11-27 07:17

I\'m in the process of building an web app that will, besides other things, need to connect to a FTP server to download or upload files. The application is written in PHP an

5条回答
  •  北海茫月
    2020-11-27 07:42

    The problem with Igor's recommendation is that it, among other things, makes for much less portable code (libssh2 isn't installed on very many hosts), it has a far more intuitive OOP-based API and RSA authentication actually makes sense (libssh2 requires you store the public key and the private key separately on the file system; the fact that they have to be separately provided is silly since most private key formats include the public key within them).

    phpseclib is also faster:

    http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/#comment_3759

提交回复
热议问题