I am trying to upload files onto my ftp server but I don't have a clue as to what is wrong with my code.
The path is exactly the way it should be and the remote path is fine too.
Thanks in all your help.
Code:
<?php
$path="C:\Documents and Settings\Blah Blah\My Documents\files\txt\LI.txt";
$remote="1.txt";
$ftp_server='ftp.example.com';//address for the ftp server
$ftp_user='screenname@example.com';
$ftp_pass='secret';
$connect_id=ftp_connect($ftp_server) or die("Couldn't connect to ftp server.");
if(ftp_login($connect_id, $ftp_user, $ftp_pass)){
if(ftp_put($connect_id, $remote, $path, FTP_ASCII)){}
else{
echo "Upload not successful <br>";
echo $path."<br>";
echo $remote;
}
}
else{
echo "Login not successful";
}
?>
Thanks in all your help.