php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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;
            }
ftp_quit($ftpStream);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-20 08:29 UTC] sander@php.net
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 http://www.php.net/support.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC