|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I'm trying to transfer files between my local machine and our webserver. I'm using a PHP-script to do some FTP-ing for me. But when I try to open or save a file locally, I get the error message that the file cannot be opened!? here's the code-fragment I use: $filesPath = "tmp"; $file = $_GET['file']; $conn_id = ftp_connect( "mateum.nl" ); $login_result = ftp_login( $conn_id, "mateum", "******" ); if ((!$conn_id) or (!$login_result)) { echo "FTP connection failed!"; exit; } ftp_chdir( $conn_id, $filesPath ); $download = ftp_get($conn_id, "test.txt" , "test.doc", FTP_ASCII); $upload = ftp_put( $conn_id, "test.doc", "test.doc", FTP_BINARY ); ftp_close($conn_id); What's wrong? Gr. Niek |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > FTP won't open my local files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|