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