Im using below code to download an .csv file from an ftp. which works if the file is placed in root - but I need to access it on a subfolder. How do I do this?
$source = "myfile.csv";
$target = fopen("myfile.csv", "w");
$conn = ftp_connect("ftp.mysever.com") or die("Could not connect");
ftp_login($conn,"user","pass");
ftp_fget($conn,$target,$source,FTP_ASCII);
echo "file downloaded.\n";