|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-20 08:29 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
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);