我使用 codeigniter 3.1.13 , php 5.6 并且我使用 FTP 連接到另一臺服務器,不幸的是,它給出了以下錯誤:
Unable to connect to your FTP server using the supplied hostname.
FTP:
$config['hostname'] = 'xxxxx.xxxxxx.net';
$config['username'] = 'xxxxxx';
$config['password'] = 'xxxxxx';
$config['debug'] = TRUE;
$config['port'] = 21;
$config['passive'] = TRUE;
這是如果我通過 filezilla 使用相同的資訊連接到 FTP
庫 ftp:https ://pastecode.io/s/uxziv8aw
我該怎么辦?
uj5u.com熱心網友回復:
如果您可以連接到服務器但無法傳輸檔案(正如您在其中一條評論中提到的那樣),則可能存在 2 個問題:
- 防火墻
- FTP 服務器上缺少寫入上傳檔案的權限。
請確保您的防火墻(如果有的話)不會阻止傳出的 FTP 連接,并且 FTP 服務器上的目錄具有將檔案寫入其中所需的權限。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/445962.html
標籤:php 代码点火器 ftp codeigniter-3
上一篇:查詢where_in逗號分隔串列
下一篇:錯誤:不允許執行您請求的操作。當CodeIgniter4中的HTTP請求方法為“POST”時,我的API被過濾器阻止
