i am trying to download a file from my server but it giving error
Connected as abc@ftp.abc.com.pk
Warning: ftp_get(): Prohibited file name: \download\aaa.zip in /home/abc/public_html/ftp1.php on line 25
There was a problem
while i am using this script
<?
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
// try to login
if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "Connected as $ftp_user@$ftp_server\n";
} else {
echo "Couldn't connect as $ftp_user\n";
}
//-------------------------------------------------------------------------------//
// define some variables
$local_file = 'c:\aaa.zip';
$server_file = '\download\aaa.zip';
// try to download $server_file and save to $local_file
if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
echo "Successfully written to $local_file\n";
} else {
echo "There was a problem\n";
}
// close the connection
ftp_close($conn_id);
?>
can some body guid me