|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Lose your application development headaches. Start developing and deploying applications with Advantage Database Server today. Download a 30-day trial for Free!
|
|
#1
|
|||
|
|||
|
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); if ($result) print "file uploaded"; else print "Not uploaded"; ftp_quit ($ftp); ?> 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. |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > ftp_put() upload from local file D: ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|