|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15629 ftp_get downloads files to remote folders and note local folders
Submitted: 2002-02-19 14:53 UTC Modified: 2002-02-20 08:29 UTC
From: tiagoalves16 at yahoo dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.1.1 OS: Unix Like
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tiagoalves16 at yahoo dot com
New email:
PHP Version: OS:


 [2002-02-19 14:53 UTC] tiagoalves16 at yahoo dot com
All the ftp_functions seens to work nicelly at my unix like server, but when i am trying to download a file from a FTP server(my_ftp_server" to my hard disk, the ftp_get function returns true, but the file goes to the same folder where my PHP script is running (a diferent server) named something like "c:\\songs\\complete.wav" 

below is my script:

$ftpStream = ftp_connect("my_ftp_server");
$loginResult = ftp_login($ftpStream, "my_user_name", "my_pass");
if ($loginResult) {

   $dir = ftp_chdir($ftpStream, "music/song");
   $file = ftp_pasv($ftpStream,true)    ;
            //get the remote file and put it in the same directory as the php file
   $file = ftp_get($ftpStream, 'c:\\songs\\complete.wav', "complete.wav", FTP_BINARY);
   echo $file;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-20 08:29 UTC]
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Feb 07 18:05:49 2023 UTC