FTP with PHP problem
Im having a problem using the FTP commands within a simple script. All i want to do is upload a text file (test.txt) to my remote PHP server, and i cant seem to get it to work.
Here is the script im using, and it errors on the Upload line.
Do I have to state the directory of the file to send? Since its just on c:\?
Any help would be much appreciated.
// connect to FTP server
$conn = ftp_connect("hostname.com");
// log in with username and password
ftp_login($conn, "username", "password");
ftp_put($conn, "test.text","test.txt", FTP_ASCII);
// close connection
Sorry, theres a typo in the upload line, but it still does not work.
It should be:-
ftp_put($conn, "test.txt","test.txt", FTP_ASCII);