May 11th, 2001, 06:37 AM
Join Date: Apr 2001
Time spent in forums: < 1 sec
Reputation Power: 0
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