Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找通过 SSL 连接使用 FTP 服务器的最佳方法。(通常,向上推送文件以及获取服务器上的文件列表)。这个项目的一个要求是我必须使用客户端 X.509 证书作为身份验证过程的一部分。
我可以使用 php 函数 ftp_ssl_connect 使用客户端证书吗?如果是这样,怎么做?我能够识别的唯一其他选择是使用 curl 通过 FTPS 工作。
任何建议或想法将不胜感激!
您可以使用允许设置 SSL 客户端证书的 PHP 流上下文函数。将创建的上下文与标准函数一起使用,例如fopen.
fopen