Hi..

I am trying to download a file using FTP Server .
fI used the ollowing script for file downloading.
FTP connection is success.
But while calling ftp_get() Getting an error like

Warning: ftp_get() [function.ftp-get]: File not found in C:\xampp\htdocs\test\ftp_check2.php on line 4

<?php
$conn = ftp_connect("192.168.1.20") or die("Could not connect");
ftp_login($conn,"user1","user1");
echo ftp_get($conn,"local/p.txt","server/p.txt",FTP_ASCII);    
ftp_close($conn);
?> 

Can Anyone Can Help me please.

You can try to ftp_chdir first to the server folder, and the try to get the file without the path.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.