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 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2010
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Help with ftp_put

    Im trying to put together a PHP FTP utility, as a mini project at work, and although ive got downloads working fine, im stuck with the upload bit. Im using IIS for the FTP and Apache for the front end on the same server.

    Im stuck on the exact syntax ofthe ftp_put function. Inparticular,
    PHP Code:
    ftp_put($conn_id$remote_file$fileFTP_ASCII
    when using the code above, remote_file variable would mean the file to be saved to the ftp server, but for the $file variable, would that be the file on the client, or the same path that the upload script resides?


    I ask this because i cant seem to get the script working, ive taken the syntax from http://uk3.php.net/manual/en/function.ftp-put.php

    Any help, much appreciated!

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    $file is the file to be uploaded. I would also recommend using FTP_BINARY over FTP_ASCII
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

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