I'm not sure why you are using a put. it seems like it should be a get.
what do you put in for the host? your server or the client? this is confusing...
Uploading a local file to site FTP server using PHP
Moderator: General Moderators
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
Code: Select all
move_upload
// should be like below if you ask me.
@copy / copy()No, the problem is that you do not understand how the process works.mjseaden wrote: I think the problem is that what I'm asking it to do is in fact impossible - I don't think PHP can access the local machine's files in this way.
If your form based submission process is on the same server as where you are trying to transfer the file to by FTP (which from what I gather it is) then you don't require the FTP part of your script (unless you are running into permissions problems).
Once your form has been submitted THE FILES ARE ON YOUR SERVER. They are stored in a temporary directory. You then just need to move the files and all should be done.
The answer to your problem has already been given, as Wayne points out look at http://www.devnetwork.net/forums/viewtopic.php?t=19787 which shows a simple implementation of what you are trying to do.
You should forget about the FTP part as I don't see this as being required.