"Warning: ftp_get() [function.ftp-get]: Error opening $localfile in $script on line 7". ie--I cannot create the local file, nor can I open it if it already exists.
code snippet is as follows:
Code: Select all
<?php
$local="c:\\file.jpg"; // I have tried with absolute paths, relative paths, etc.
$remote="/path/to/file.jpg";
$ftp_conn=ftp_ssl_connect($host) or die('connection failed');
@ftp_login($ftp_conn,$username,$password);
ftp_get($ftp_conn,$local,$remote,FTP_BINARY);
?>