October 30th, 2000, 08:58 PM
I'm trying to upload a file on my local
computer to the server.
i know the script is allright, i also
tried to rename files and that worked
but i can't upload a file from my local harddisk d: to the server
here's the script i use :
$server = '*******'; //changed for this example
$user = '*****'; //changed for this example
$pass = '******'; //changed for this example
$source_file = 'd:background.gif';
$destination_file = '/opt/guide/www.mydomain.nl/HTML/images/testbackground.gif';
$ftp_connect = ftp_connect ($server)
or die ("Could not connect to $server");
$ftp = ftp_login ($ftp_connect, $user, $pass)
or die ("Authentication failed");
$result=ftp_put ($ftp, "$destination_file", $source_file, FTP_BINARY);
print "file uploaded";
print "Not uploaded";
i keep getting the error message :
Warning: error opening d:background.gif in /opt/guide/www.egifts.nl/HTML/testrename.php3 on line 20
What am i doing wrong ????
Thanks for your help !
Jan, The Netherlands.
September 23rd, 2001, 04:03 PM
Pretty old message. But I miss the answer - since I have the same problem. Although my local file path is "c:/test.txt". The same error message. I tried "c://test.txt" and also "c:\test.txt", but with no effect.
Thanks for advice.