PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi everyone,
This is my first time trying to upload something with php through ftp. The idea is to upload a certain string to a new file and this is my current code:
thanks for your reply.
I only posted a part of the code. You can replace "// FTP connection is set up here -- \\ " with ftp_connect and ftp_login functions. The connection is not the problem however, as the temp file is put to the ftp server, but there is nothing in it!
login to the FTP server with the ftp credentials. When you login what folder you see is the FTP root. can you navigate to the path shown in the "$this->conf['ftp']['tdir']" variable ? Does the folder exist?
yea, the folder exists. the actual put operation works fine (no errors or anything) and a file with the correct filename is uploaded to the server, but there is nothing in it. like the 'tempfile' was empty.