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.
ftp_connect 功能对某些主机不起作用,而如果我通过 ftp 软件连接它,它就可以工作。虽然它对其他网站做得很好。
可能的原因是什么?或者有没有其他更好的方法可以连接到 ftp 来复制和删除文件。
您可能对“被动 FTP”的要求有疑问。查看 PHP 的ftp_pasv()函数。
还要记住,FTP 是一种古老的、不安全的协议。它早于大多数互联网,并且在复杂的网络环境中工作可能很挑剔。如果您可以切换到SFTP或SCP,甚至通过 HTTPS 切换到WebDAV,您可能会过得更好。