...

View Full Version : ftp_put() error



boeing747fp
04-27-2004, 01:25 AM
i have this code that is supposed to upload a file to the /xls/ directory, but i keep getting this error: Warning: ftp_put() expects parameter 1 to be resource, string given in /home/whmx/public_html/admin/top30/sendxls_action.php on line 21
-----------------------
$filename = $_FILES['file']['tmp_name'];
$connect = ftp_connect("localhost");
$ftp_login = ftp_login($connect, "user", "pwd");
$uploadto = $_SERVER['DOCUMENT_ROOT']."/xls";
ftp_put($uploadto, $filename, $filename, FTP_ASCII
ftp_close($connect);

**********************
nvm- i found it
ftp_put($connect,$filename,$uploadto,FTP_ASCII);

all fixed!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum