Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: ftp_put() error

  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post

    ftp_put() error

    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!
    Last edited by boeing747fp; 04-27-2004 at 01:43 AM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •