Jump to content

problem with ftp download


c_shelswell

Recommended Posts

Hi does anyone know why i might be having a problem here. I've got a bit of php the brings up my ftp server list as link so i can download a file. it's working fine at the root level and when i click a file it will download it no probs to my c:/ drive.

However when i go to the www. section of my ftp it won't download it. Here's my code:

[code]function getFile()
{
$conn = DoConn();
$currDir ="";

if (isset($_GET['currFile']))
{
$currFile = $_GET['currFile'];

if(ftp_get($conn, "c:/".$currFile, $currFile, FTP_BINARY))    [color=red]<< line 105[/color]
{
echo 'the file <b>'.$currFile.'</b> was succesfully downloaded.';
}
else
{
echo 'the file <b>'.$currFile.'</b> could not be downloaded.';
}

}
}[/code]

this is the error i get

Warning: ftp_get() [function.ftp-get]: Can't open playlist.xml: No such file or directory in E:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin\my_ftp.php on line 105

i've marked line 105 cheers
Link to comment
https://forums.phpfreaks.com/topic/29021-problem-with-ftp-download/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.