0
我正在使用PHP,我想連接到SFTP中的遠程服務器,但網站上說: 致命錯誤:調用未定義函數ssh2_connect()在D:\ xampp \ htdocs \ dive \ database.php on line 9如何通過php連接到sftp服務器
你能詳細告訴我怎麼做?我累了
<?php
$connection = ssh2_connect('ftp.server.com', 22);
if (ssh2_auth_password($connection, 'username', 'password'))
echo "Authentication success";
else
echo "Authentication failure";
?>
但它不起作用。
當我連接到服務器後,如果我想插入一些數據到表中,是否有區別?我應該使用哪個功能?
你安裝和配置ssh2嗎? http://us1.php.net/manual/en/ssh2.setup.php – Samsquanch