getting error with curl and trellis php wordpress
问题 Hello their i am getting error in this code with trellis server but it is working on other server perfectly <?php $localfile = 'test.txt'; $sftpServer = 'x'; $sftpUsername = 'x'; $sftpPassword = 'x'; $sftpPort = 22; $sftpRemoteDir = '/'; $ch = curl_init('sftp://' . $sftpServer . ':' . $sftpPort . $sftpRemoteDir . '/' . basename($localfile)); $fh = fopen($localfile, 'r'); if ($fh) { curl_setopt($ch, CURLOPT_USERPWD, $sftpUsername . ':' . $sftpPassword); curl_setopt($ch, CURLOPT_UPLOAD, true);