我已经成功通过ftp上传文件,但我现在需要通过SFTP上传文件。我可以成功连接到远程服务器,创建一个文件并写入它,但我无法将现有文件从我的本地服务器上传到远程服务器。ftp_put不是通过sftp连接触发的吗?我的代码用来写一个文件://Sendfileviasftptoserver$strServer="*****";$strServerPort="****";$strServerUsername="*****";$strServerPassword="*****";$csv_filename="Test_File.csv";//connecttoserver$resConnecti