這是令人沮喪的...我不斷收到我的ftp_put錯誤:我的PHP ftp_put有什麼問題?
此錯誤:在/用戶/ XXXX /文檔/工作/東西
沒有這樣的文件或目錄是否有任何明顯的錯誤在我的代碼中,我是盲目的?
$server = "79.170.40.xxx";
$connection = ftp_connect($server);
$login = ftp_login($connection, "xxx.xxx.co.uk", "xxx");
if (!$connection || !$login) { die('Connection attempt failed!'); }
$upload = ftp_put($connection, '/home/sites/xxx.xxx.co.uk/public_html/dev/uploads/training/powerpoints/' . $filename, $details['tmp_name'], FTP_ASCII);
if (!$upload) { echo 'FTP upload failed!'; }
ftp_close($connection);
乾杯。
您確定目錄/home/sites/xxx.xxx.co.uk/public_html/dev/uploads/training/powerpoints/存在嗎?它不會自動創建。 – 2010-03-10 10:25:17