...

View Full Version : ftp_get help on windows server



rfresh
03-12-2009, 06:28 PM
I have a small test script in which I am trying to download a file from my windows server. My script is running on a linux server. I can't download the file. I'm not sure if I have a syntax slash issue or not. I'm used to working on linux machines - is there anything different I have to do on a windows box?



$php_host_username = "username";
$php_host_password = "pw";
$conn = ftp_connect("ftp.mysite.com");
if ($conn)
{
echo "ftp connect ok<br>";
if (ftp_login($conn,$php_host_username,$php_host_password))
{
echo "ftp_login ok<br>";
if (ftp_get($conn,"dest.txt", "wwwroot/source.txt",FTP_ASCII))
{
echo "ftp_get ok<br>";
}
else
{
echo "ftp_get fail<br>";
}
}
else
{
echo "ftp_login failed<br>";
}
}
else
{
echo "ftp connect failed<br>";
}
ftp_close($conn);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum